pub struct Variants<F: Form = MetaForm> { /* private fields */ }
Expand description
Builds a definition of a variant type i.e an enum
Implementations§
source§impl<F: Form> Variants<F>
impl<F: Form> Variants<F>
sourcepub fn variant_unit(self, name: F::String, index: u8) -> Self
pub fn variant_unit(self, name: F::String, index: u8) -> Self
Add a unit variant (without fields).
sourcepub fn finalize(self) -> TypeDefVariant<F>
pub fn finalize(self) -> TypeDefVariant<F>
Construct a new TypeDefVariant
from the initialized builder variants.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Variants<F>
impl<F> RefUnwindSafe for Variants<F>
impl<F> Send for Variants<F>
impl<F> Sync for Variants<F>
impl<F> Unpin for Variants<F>
impl<F> UnwindSafe for Variants<F>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more