Also want: a macro to check for kinds: #[derive(Access)] enum Cats { #[access(is)] Tabby, #[access(is)] Spotty, #[access(is)] Snuffles } let cat = Cats::Snuffles; http://cat.is _tabby(); // false http://cat.is _snuffles(); // true
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I feel like having getters/setters is sort of an anti pattern in
#rustlang -
Could you elaborate? Why is it an anti-pattern? How else would you for example implement a field that should only allow for read-only access?
- 5 more replies
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I'm pretty sure I've seen this before! Just don't remember where. It's not a hard proc macro to write though.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.