pub struct Block {
pub stmts: Vec<Stmt>,
pub value: Option<Box<Expr>>,
pub span: Span,
}Expand description
a { ... } block: a sequence of statements, optionally ending in a trailing
expression with no ;. value is that trailing expression; None means
the block’s value is void (it ended in a ;, or it was empty). a block is
also an expression in this language – see Expr::Block.
Fields§
§stmts: Vec<Stmt>the statements, in order.
value: Option<Box<Expr>>the trailing expression (no terminating ;) that is the block’s value,
or None for a void block.
span: Span{ to }.
Trait Implementations§
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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