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 Freeze for StmtVarDecl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)