pub struct EnumVariant {
pub idx: usize,
/* private fields */
}Expand description
A member of an EnumStructure
Fields§
§idx: usizeTrait Implementations§
Source§impl Constructable for EnumVariant
impl Constructable for EnumVariant
Source§fn build_constructor(
&self,
generator: impl Fn(NamedOrUnnamedField<'_>) -> Result<Expr, Box<dyn Error>>,
) -> Result<Expr, Box<dyn Error>>
fn build_constructor( &self, generator: impl Fn(NamedOrUnnamedField<'_>) -> Result<Expr, Box<dyn Error>>, ) -> Result<Expr, Box<dyn Error>>
Builds a constructor expression by evaluating a expression generator for each field
fn get_fields(&self) -> &Fields
fn get_fields_mut(&mut self) -> &mut Fields
Source§fn get_constructor_path(&self) -> Path
fn get_constructor_path(&self) -> Path
Get the path required to construct the expression
Auto Trait Implementations§
impl Freeze for EnumVariant
impl RefUnwindSafe for EnumVariant
impl !Send for EnumVariant
impl !Sync for EnumVariant
impl Unpin for EnumVariant
impl UnwindSafe for EnumVariant
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