#[non_exhaustive]pub struct EnumCase<'arena, 'src> {
pub name: Ident<'src>,
pub value: Option<Expr<'arena, 'src>>,
pub attributes: ArenaVec<'arena, Attribute<'arena, 'src>>,
pub doc_comment: Option<Comment<'src>>,
}Expand description
A case inside an enum.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Ident<'src>Case name.
value: Option<Expr<'arena, 'src>>Backing value of a backed case.
attributes: ArenaVec<'arena, Attribute<'arena, 'src>>#[...] attributes applied to this node.
doc_comment: Option<Comment<'src>>Preceding /** */ doc-block, if any.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'arena, 'src> !RefUnwindSafe for EnumCase<'arena, 'src>
impl<'arena, 'src> !Send for EnumCase<'arena, 'src>
impl<'arena, 'src> !Sync for EnumCase<'arena, 'src>
impl<'arena, 'src> !UnwindSafe for EnumCase<'arena, 'src>
impl<'arena, 'src> Freeze for EnumCase<'arena, 'src>
impl<'arena, 'src> Unpin for EnumCase<'arena, 'src>
impl<'arena, 'src> UnsafeUnpin for EnumCase<'arena, 'src>
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