Struct moore_svlog::hir::EnumVariant [−][src]
pub struct EnumVariant {
pub id: NodeId,
pub name: Spanned<Name>,
pub span: Span,
pub enum_id: NodeId,
pub index: usize,
pub value: Option<NodeId>,
}
Expand description
A single variant of an enum.
Fields
id: NodeId
name: Spanned<Name>
span: Span
enum_id: NodeId
The enum type declaration that contains this variant.
index: usize
The index of the variant within the enum.
value: Option<NodeId>
The optional expression that explicitly assigns a value to the variant.
Trait Implementations
Allocate a value of type T
.
Obtain a span which can be used to refer to this node in error messages
presented to humans. This will generally be the name for things like
entities, processes, and variables. Defaults to return whatever span()
returns. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for EnumVariant
impl Send for EnumVariant
impl Sync for EnumVariant
impl Unpin for EnumVariant
impl UnwindSafe for EnumVariant
Blanket Implementations
Mutably borrows from an owned value. Read more