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