pub struct Block {
pub statements: Vec<Statement>,
pub result: Option<Box<Expression>>,
}Expand description
A sequence of statements with an optional trailing expression.
Fields§
§statements: Vec<Statement>Statements in the block.
result: Option<Box<Expression>>Optional result expression.
Implementations§
Source§impl Block
impl Block
Sourcepub fn expression(expression: Expression) -> Self
pub fn expression(expression: Expression) -> Self
Creates a block containing only a result expression.
Trait Implementations§
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