Struct syn_solidity::StmtVarDecl
source · pub struct StmtVarDecl {
pub declaration: VarDeclDecl,
pub assignment: Option<(Eq, Expr)>,
pub semi_token: Semi,
}
Expand description
A variable declaration statement: uint256 foo = 42;
.
Solidity Reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.variableDeclarationStatement
Fields§
§declaration: VarDeclDecl
§assignment: Option<(Eq, Expr)>
§semi_token: Semi
Implementations§
source§impl StmtVarDecl
impl StmtVarDecl
pub fn parse_or_expr(input: ParseStream<'_>) -> Result<Stmt>
Trait Implementations§
source§impl Clone for StmtVarDecl
impl Clone for StmtVarDecl
source§fn clone(&self) -> StmtVarDecl
fn clone(&self) -> StmtVarDecl
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 StmtVarDecl
impl Debug for StmtVarDecl
source§impl Parse for StmtVarDecl
impl Parse for StmtVarDecl
fn parse(input: ParseStream<'_>) -> Result<Self>
source§impl Spanned for StmtVarDecl
impl Spanned for StmtVarDecl
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.Auto Trait Implementations§
impl RefUnwindSafe for StmtVarDecl
impl !Send for StmtVarDecl
impl !Sync for StmtVarDecl
impl Unpin for StmtVarDecl
impl UnwindSafe for StmtVarDecl
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