pub enum CoroutineResult<Yield, Return> {
Yield(Yield),
Return(Return),
SystemCall,
}
Expand description
Value returned from resuming a coroutine.
Variants§
Yield(Yield)
Value returned by a coroutine suspending itself with a Yielder
.
Return(Return)
Value returned by a coroutine returning from its main function.
SystemCall
Implementations§
Trait Implementations§
Source§impl<Yield: Clone, Return: Clone> Clone for CoroutineResult<Yield, Return>
impl<Yield: Clone, Return: Clone> Clone for CoroutineResult<Yield, Return>
Source§fn clone(&self) -> CoroutineResult<Yield, Return>
fn clone(&self) -> CoroutineResult<Yield, Return>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Yield: PartialEq, Return: PartialEq> PartialEq for CoroutineResult<Yield, Return>
impl<Yield: PartialEq, Return: PartialEq> PartialEq for CoroutineResult<Yield, Return>
Source§fn eq(&self, other: &CoroutineResult<Yield, Return>) -> bool
fn eq(&self, other: &CoroutineResult<Yield, Return>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<Yield: Copy, Return: Copy> Copy for CoroutineResult<Yield, Return>
impl<Yield: Eq, Return: Eq> Eq for CoroutineResult<Yield, Return>
impl<Yield, Return> StructuralPartialEq for CoroutineResult<Yield, Return>
Auto Trait Implementations§
impl<Yield, Return> Freeze for CoroutineResult<Yield, Return>
impl<Yield, Return> RefUnwindSafe for CoroutineResult<Yield, Return>where
Yield: RefUnwindSafe,
Return: RefUnwindSafe,
impl<Yield, Return> Send for CoroutineResult<Yield, Return>
impl<Yield, Return> Sync for CoroutineResult<Yield, Return>
impl<Yield, Return> Unpin for CoroutineResult<Yield, Return>
impl<Yield, Return> UnwindSafe for CoroutineResult<Yield, Return>where
Yield: UnwindSafe,
Return: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more