pub enum CoroutineResult<Yield, Return> {
Yield(Yield),
Return(Return),
}
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.
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 copy 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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)