pub struct EnumDecl {
pub name: Ident,
pub is_pub: bool,
pub variants: Vec<EnumVariant>,
pub span: Span,
}Expand description
enum Name { variants... } (spec 2.2), optionally pub. An enum has one
or more variants; an empty { } is V0002, since the parser found a
complete-looking declaration missing the one thing it must have.
Fields§
§name: Ident§is_pub: bool§variants: Vec<EnumVariant>§span: SpanTrait Implementations§
impl StructuralPartialEq for EnumDecl
Auto Trait Implementations§
impl Freeze for EnumDecl
impl RefUnwindSafe for EnumDecl
impl Send for EnumDecl
impl Sync for EnumDecl
impl Unpin for EnumDecl
impl UnsafeUnpin for EnumDecl
impl UnwindSafe for EnumDecl
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