pub struct ImplicitReturn<S: Expr<Scope = Scope>, Scope>(pub S, pub PhantomData<Scope>);Expand description
Wrapper around the last statement in a block without a semicolon, locally returning its value.
Tuple Fields§
§0: S§1: PhantomData<Scope>Trait Implementations§
Source§impl<S: Expr<Scope = Scope>, Scope> Expr for ImplicitReturn<S, Scope>
impl<S: Expr<Scope = Scope>, Scope> Expr for ImplicitReturn<S, Scope>
Source§const COMPLEXITY: usize = S::COMPLEXITY
const COMPLEXITY: usize = S::COMPLEXITY
Trivial measure of complexity: a variable is 1, an operation is 1, a binary op is 2, a conditional is 3, etc.
impl<S: Expr<Scope = Scope>, Scope> StatementNode for ImplicitReturn<S, Scope>
Auto Trait Implementations§
impl<S, Scope> Freeze for ImplicitReturn<S, Scope>where
S: Freeze,
impl<S, Scope> RefUnwindSafe for ImplicitReturn<S, Scope>where
S: RefUnwindSafe,
Scope: RefUnwindSafe,
impl<S, Scope> Send for ImplicitReturn<S, Scope>
impl<S, Scope> Sync for ImplicitReturn<S, Scope>
impl<S, Scope> Unpin for ImplicitReturn<S, Scope>
impl<S, Scope> UnwindSafe for ImplicitReturn<S, Scope>where
S: UnwindSafe,
Scope: UnwindSafe,
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