Struct virtue::parse::EnumVariant
source · pub struct EnumVariant {
pub name: Ident,
pub fields: Option<Fields>,
pub value: Option<Literal>,
pub attributes: Vec<Attribute>,
}Expand description
A variant of an enum
Fields§
§name: IdentThe name of the variant
fields: Option<Fields>The field of the variant. See Fields for more info
value: Option<Literal>The value of this variant. This can be one of:
Baz = 5Baz(i32) = 5Baz { a: i32} = 5In either case this value will beSome(Literal::i32(5))
attributes: Vec<Attribute>The attributes of this variant
Trait Implementations§
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