Enum genawaiter::GeneratorState
source · pub enum GeneratorState<Y, R> {
Yielded(Y),
Complete(R),
}
Expand description
The result of a generator resumption.
This is modeled after the stdlib’s nightly-only
[std::ops::GeneratorState
].
Variants§
Yielded(Y)
The generator suspended with a value.
Complete(R)
The generator completed with a return value.
Trait Implementations§
source§impl<Y: PartialEq, R: PartialEq> PartialEq for GeneratorState<Y, R>
impl<Y: PartialEq, R: PartialEq> PartialEq for GeneratorState<Y, R>
source§fn eq(&self, other: &GeneratorState<Y, R>) -> bool
fn eq(&self, other: &GeneratorState<Y, R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<Y, R> StructuralPartialEq for GeneratorState<Y, R>
Auto Trait Implementations§
impl<Y, R> Freeze for GeneratorState<Y, R>
impl<Y, R> RefUnwindSafe for GeneratorState<Y, R>where
Y: RefUnwindSafe,
R: RefUnwindSafe,
impl<Y, R> Send for GeneratorState<Y, R>
impl<Y, R> Sync for GeneratorState<Y, R>
impl<Y, R> Unpin for GeneratorState<Y, R>
impl<Y, R> UnwindSafe for GeneratorState<Y, R>where
Y: 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