Struct syn_solidity::VariableDeclaration 
source · pub struct VariableDeclaration {
    pub attrs: Vec<Attribute>,
    pub ty: Type,
    pub storage: Option<Storage>,
    pub name: Option<SolIdent>,
}Expand description
A variable declaration: string memory hello.
Fields§
§attrs: Vec<Attribute>The attributes of the variable.
ty: TypeThe type of the variable.
storage: Option<Storage>The storage location of the variable, if any.
name: Option<SolIdent>The name of the variable. This is always Some if parsed as part of
Parameters or a Stmt.
Implementations§
source§impl VariableDeclaration
 
impl VariableDeclaration
pub const fn new(ty: Type) -> Self
pub const fn new_with( ty: Type, storage: Option<Storage>, name: Option<SolIdent> ) -> Self
sourcepub fn fmt_eip712(&self, f: &mut impl Write) -> Result
 
pub fn fmt_eip712(&self, f: &mut impl Write) -> Result
Formats self as an EIP-712 field: <ty> <name>
pub fn parse_with_name(input: ParseStream<'_>) -> Result<Self>
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 Debug for VariableDeclaration
 
impl Debug for VariableDeclaration
source§impl Display for VariableDeclaration
 
impl Display for VariableDeclaration
source§impl<P: Default> FromIterator<VariableDeclaration> for Parameters<P>
 
impl<P: Default> FromIterator<VariableDeclaration> for Parameters<P>
source§fn from_iter<T: IntoIterator<Item = VariableDeclaration>>(iter: T) -> Self
 
fn from_iter<T: IntoIterator<Item = VariableDeclaration>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Hash for VariableDeclaration
 
impl Hash for VariableDeclaration
source§impl Parse for VariableDeclaration
 
impl Parse for VariableDeclaration
fn parse(input: ParseStream<'_>) -> Result<Self>
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 ==.source§impl Spanned for VariableDeclaration
 
impl Spanned for VariableDeclaration
source§fn span(&self) -> Span
 
fn span(&self) -> Span
Returns a 
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.impl Eq for VariableDeclaration
impl StructuralEq for VariableDeclaration
impl StructuralPartialEq for VariableDeclaration
Auto Trait Implementations§
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