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