Struct pyo3_macros_backend::frompyobject::Enum
source · struct Enum<'a> {
enum_ident: &'a Ident,
variants: Vec<Container<'a>>,
}
Expand description
Describes derivation input of an enum.
Fields§
§enum_ident: &'a Ident
§variants: Vec<Container<'a>>
Implementations§
source§impl<'a> Enum<'a>
impl<'a> Enum<'a>
sourcefn new(data_enum: &'a DataEnum, ident: &'a Ident) -> Result<Self>
fn new(data_enum: &'a DataEnum, ident: &'a Ident) -> Result<Self>
Construct a new enum representation.
data_enum
is the syn
representation of the input enum, ident
is the
Identifier
of the enum.
sourcefn build(&self, ctx: &Ctx) -> (TokenStream, TokenStream)
fn build(&self, ctx: &Ctx) -> (TokenStream, TokenStream)
Build derivation body for enums.
Auto Trait Implementations§
impl<'a> Freeze for Enum<'a>
impl<'a> RefUnwindSafe for Enum<'a>
impl<'a> !Send for Enum<'a>
impl<'a> !Sync for Enum<'a>
impl<'a> Unpin for Enum<'a>
impl<'a> UnwindSafe for Enum<'a>
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