Macro variter::foreign_derive_var_iter [−][src]
Automatically derive VarIter
for foreign field-less enums
. Be sure to
include all variants and that the enum
is not marked with #[non_exhaustive]
.
Syntax
foreign_derive_var_iter! {
Typename [] // enum has no variants
Typename [Typename::Variant1, Typename::variant2, ... ] // trailing comma supported
...
}
You may optionally pass attributes to the impl
block by prefixing your
type definition with @impl_attr { ATTR... }
, for example @impl_attr { #[doc(hidden)] #[cfg(test)] ... }
.