Enum base_coroutine::coroutine::CoroutineResult
source · 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
sourceimpl<Yield: Clone, Return: Clone> Clone for CoroutineResult<Yield, Return>
impl<Yield: Clone, Return: Clone> Clone for CoroutineResult<Yield, Return>
sourcefn clone(&self) -> CoroutineResult<Yield, Return>
fn clone(&self) -> CoroutineResult<Yield, Return>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Yield: Debug, Return: Debug> Debug for CoroutineResult<Yield, Return>
impl<Yield: Debug, Return: Debug> Debug for CoroutineResult<Yield, Return>
sourceimpl<Yield: Hash, Return: Hash> Hash for CoroutineResult<Yield, Return>
impl<Yield: Hash, Return: Hash> Hash for CoroutineResult<Yield, Return>
sourceimpl<Yield: PartialEq, Return: PartialEq> PartialEq<CoroutineResult<Yield, Return>> for CoroutineResult<Yield, Return>
impl<Yield: PartialEq, Return: PartialEq> PartialEq<CoroutineResult<Yield, Return>> for CoroutineResult<Yield, Return>
sourcefn eq(&self, other: &CoroutineResult<Yield, Return>) -> bool
fn eq(&self, other: &CoroutineResult<Yield, Return>) -> bool
impl<Yield: Copy, Return: Copy> Copy for CoroutineResult<Yield, Return>
impl<Yield: Eq, Return: Eq> Eq for CoroutineResult<Yield, Return>
impl<Yield, Return> StructuralEq for CoroutineResult<Yield, Return>
impl<Yield, Return> StructuralPartialEq for CoroutineResult<Yield, Return>
Auto Trait Implementations
impl<Yield, Return> RefUnwindSafe for CoroutineResult<Yield, Return>where
Return: RefUnwindSafe,
Yield: RefUnwindSafe,
impl<Yield, Return> Send for CoroutineResult<Yield, Return>where
Return: Send,
Yield: Send,
impl<Yield, Return> Sync for CoroutineResult<Yield, Return>where
Return: Sync,
Yield: Sync,
impl<Yield, Return> Unpin for CoroutineResult<Yield, Return>where
Return: Unpin,
Yield: Unpin,
impl<Yield, Return> UnwindSafe for CoroutineResult<Yield, Return>where
Return: UnwindSafe,
Yield: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more