pub enum Command<R, T> {
Give(T),
Return(R),
Break,
Continue,
}
Expand description
A deferred control-flow command.
Variants§
Give(T)
Pass the value on.
This is not the same as return. What it does is that instead of breaking the control flow,
it passes on the value. That is, when run!()
is called on this variant, the value that it
holds is evaluated to.
Return(R)
Return the value.
This (when eventually executed) returns the given value.
Break
Break a loop.
This (when eventually executed) breaks the loop.
Continue
Continue a loop.
This (when eventually executed) continues the loop to next iteration.
Auto Trait Implementations§
impl<R, T> Freeze for Command<R, T>
impl<R, T> RefUnwindSafe for Command<R, T>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, T> Send for Command<R, T>
impl<R, T> Sync for Command<R, T>
impl<R, T> Unpin for Command<R, T>
impl<R, T> UnwindSafe for Command<R, T>where
T: UnwindSafe,
R: 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