Struct solang_parser::pt::EnumDefinition
source · pub struct EnumDefinition {
pub loc: Loc,
pub name: Option<Identifier>,
pub values: Vec<Option<Identifier>>,
}
Expand description
An enum definition.
enum <name> { <values>,* }
Fields§
§loc: Loc
The code location.
name: Option<Identifier>
The identifier.
This field is None
only if an error occurred during parsing.
values: Vec<Option<Identifier>>
The list of values.
This field contains None
only if an error occurred during parsing.
Trait Implementations§
source§impl Clone for EnumDefinition
impl Clone for EnumDefinition
source§fn clone(&self) -> EnumDefinition
fn clone(&self) -> EnumDefinition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CodeLocation for EnumDefinition
impl CodeLocation for EnumDefinition
source§impl Debug for EnumDefinition
impl Debug for EnumDefinition
source§impl Display for EnumDefinition
impl Display for EnumDefinition
source§impl PartialEq for EnumDefinition
impl PartialEq for EnumDefinition
source§fn eq(&self, other: &EnumDefinition) -> bool
fn eq(&self, other: &EnumDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for EnumDefinition
impl StructuralPartialEq for EnumDefinition
Auto Trait Implementations§
impl Freeze for EnumDefinition
impl RefUnwindSafe for EnumDefinition
impl Send for EnumDefinition
impl Sync for EnumDefinition
impl Unpin for EnumDefinition
impl UnwindSafe for EnumDefinition
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more