pub enum ClosureBody<'a> {
Expression(&'a Expr<'a>),
Block(Block<'a>),
}Expand description
Body of a closure expression.
Variants§
Expression(&'a Expr<'a>)
Single expression: (n: Int) -> n * 2
Block(Block<'a>)
Block of statements: (n: Int) ->: followed by indented body
Trait Implementations§
Source§impl<'a> Clone for ClosureBody<'a>
impl<'a> Clone for ClosureBody<'a>
Source§fn clone(&self) -> ClosureBody<'a>
fn clone(&self) -> ClosureBody<'a>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'a> Freeze for ClosureBody<'a>
impl<'a> RefUnwindSafe for ClosureBody<'a>
impl<'a> Send for ClosureBody<'a>
impl<'a> Sync for ClosureBody<'a>
impl<'a> Unpin for ClosureBody<'a>
impl<'a> UnwindSafe for ClosureBody<'a>
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