#[non_exhaustive]pub struct EnumCase {
pub name: Ident,
pub value: Option<Expr>,
pub attributes: Box<[Attribute]>,
pub doc_comment: Option<Comment>,
}Expand description
An enum case.
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: IdentCase name.
value: Option<Expr>Backing value.
attributes: Box<[Attribute]>Attributes on the case.
doc_comment: Option<Comment>Preceding doc comment.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumCase
impl RefUnwindSafe for EnumCase
impl Send for EnumCase
impl Sync for EnumCase
impl Unpin for EnumCase
impl UnsafeUnpin for EnumCase
impl UnwindSafe for EnumCase
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