Struct syn_helpers::EnumVariant
source · pub struct EnumVariant {
pub idx: usize,
/* private fields */
}
Expand description
A member of an EnumStructure
Fields§
§idx: usize
Trait 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 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