pub struct EnumDef {
pub name: String,
pub variants: Vec<String>,
pub position: Option<Position>,
}Expand description
A user-declared top-level enum Name { V1, V2, ... } (#enum). A sibling of
Model/Struct. Referenced from a field by its bare PascalCase name.
Variants are PascalCase, unique, non-empty, and map to 0..N (the stored
u8 discriminant) in declaration order.
Fields§
§name: String§variants: Vec<String>§position: Option<Position>Source position of the enum name (None when synthesized).
Trait Implementations§
impl StructuralPartialEq for EnumDef
Auto Trait Implementations§
impl Freeze for EnumDef
impl RefUnwindSafe for EnumDef
impl Send for EnumDef
impl Sync for EnumDef
impl Unpin for EnumDef
impl UnsafeUnpin for EnumDef
impl UnwindSafe for EnumDef
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