pub struct Variant {
pub name: String,
pub pos: Pos,
pub body: VariantBody,
}Expand description
A variant of an enum, which is a constructor and what it takes.
Fields§
§name: StringThe name of the constructor.
pos: PosThe position of the name.
body: VariantBodyWhat the constructor takes.
Trait Implementations§
impl Eq for Variant
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Forget for Variant
impl Freeze for Variantwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Field>: Freeze,
PhantomData<Parameter>: Freeze,
PhantomData<Type>: Freeze,
*const Type is !null: Freeze,
impl Move for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variantwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Field>: UnsafeUnpin,
PhantomData<Parameter>: UnsafeUnpin,
PhantomData<Type>: UnsafeUnpin,
*const Type is !null: UnsafeUnpin,
impl UnwindSafe for Variant
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