Macro IsVariant
macro_rules! IsVariant { ... }
What #[derive(IsVariant)] generates
When an enum is decorated with #[derive(IsVariant)], for each variant foo in
the enum, a public instance method is_foo(&self) -> bool is generated. If you
don't want the is_foo method generated for a variant you can put the
#[is_variant(ignore)] attribute on that variant.
Example usage
# use IsVariant;
#
assert!;
assert!;
What is generated?
The derive in the above example generates code like this:
#