pub enum YulStmt {
Block(YulBlock),
Decl(YulVarDecl),
Assign(YulVarAssign),
Call(YulFnCall),
If(YulIf),
For(YulFor),
Switch(YulSwitch),
Leave(leave),
Break(Break),
Continue(Continue),
FunctionDef(YulFunctionDef),
}
Expand description
A Yul statement.
Solidity Reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.yulStatement
Variants§
Block(YulBlock)
A Yul blocked scope: { ... }
.
Decl(YulVarDecl)
A variable declaration statement: let x := 0
.
Assign(YulVarAssign)
A variable assignment statement: x := 1
.
Call(YulFnCall)
A function call statement: foo(a, b)
.
If(YulIf)
A if statement: if lt(a, b) { ... }
.
For(YulFor)
A for statement: for {let i := 0} lt(i,10) {i := add(i,1)} { ... }
.
Switch(YulSwitch)
A switch statement: switch expr case 0 { ... } default { ... }
.
Leave(leave)
A leave statement: leave
.
Break(Break)
A break statement: break
.
Continue(Continue)
A continue statement: continue
.
FunctionDef(YulFunctionDef)
A function definition statement: function f() { ... }
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YulStmt
impl RefUnwindSafe for YulStmt
impl !Send for YulStmt
impl !Sync for YulStmt
impl Unpin for YulStmt
impl UnwindSafe for YulStmt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 216 bytes
Size for each variant:
Block
: 48 bytesDecl
: 160 bytesAssign
: 144 bytesCall
: 88 bytesIf
: 112 bytesFor
: 216 bytesSwitch
: 184 bytesLeave
: 20 bytesBreak
: 20 bytesContinue
: 20 bytesFunctionDef
: 192 bytes