Struct solang_parser::pt::StructDefinition
source · pub struct StructDefinition {
pub loc: Loc,
pub name: Option<Identifier>,
pub fields: Vec<VariableDeclaration>,
}
Expand description
A struct definition.
struct <name> { <fields>;* }
Fields§
§loc: Loc
The code location.
name: Option<Identifier>
The identifier.
This field is None
only if an error occurred during parsing.
fields: Vec<VariableDeclaration>
The list of fields.
Trait Implementations§
source§impl Clone for StructDefinition
impl Clone for StructDefinition
source§fn clone(&self) -> StructDefinition
fn clone(&self) -> StructDefinition
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 StructDefinition
impl CodeLocation for StructDefinition
source§impl Debug for StructDefinition
impl Debug for StructDefinition
source§impl Display for StructDefinition
impl Display for StructDefinition
source§impl PartialEq for StructDefinition
impl PartialEq for StructDefinition
source§fn eq(&self, other: &StructDefinition) -> bool
fn eq(&self, other: &StructDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StructDefinition
impl StructuralPartialEq for StructDefinition
Auto Trait Implementations§
impl Freeze for StructDefinition
impl RefUnwindSafe for StructDefinition
impl Send for StructDefinition
impl Sync for StructDefinition
impl Unpin for StructDefinition
impl UnwindSafe for StructDefinition
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