[−][src]Struct generator_extensions::Fuse
The return type of Resumable::fuse
.
Implementations
impl<'a, R, G: Generator<R, Return = ()>> Fuse<'a, R, G>
[src]
#[must_use]pub fn new(pin: Pin<&'a mut G>) -> Self
[src]
Creates a new Fuse
generator from a pinned generator.
Consider using Resumable::fuse
instead.
#[must_use]pub fn is_complete(&self) -> bool
[src]
Returns true
if the pinned generator has completed.
Notes
This method may return false
even if the generator is complete if
new
was called with a generator which was already complete.
pub fn stop(&mut self)
[src]
Forces the Fuse
to repeatedly return
GeneratorState::Complete
(())
, even if the underlying pinned
generator is not yet complete.
The underlying pinned generator is neither made to complete nor dropped.
#[must_use]pub fn into_inner(self) -> Pin<&'a mut G>
[src]
Retrieves the original pinned generator.
Trait Implementations
impl<'a, R, G: Generator<R, Return = ()>> Debug for Fuse<'a, R, G>
[src]
impl<'a, R, G: Generator<R, Return = ()>> Generator<R> for Fuse<'a, R, G>
[src]
type Yield = G::Yield
🔬 This is a nightly-only experimental API. (
generator_trait
)The type of value this generator yields. Read more
type Return = ()
🔬 This is a nightly-only experimental API. (
generator_trait
)The type of value this generator returns. Read more
pub fn resume(
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>
[src]
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>
Auto Trait Implementations
impl<'a, R, G> Send for Fuse<'a, R, G> where
G: Send,
G: Send,
impl<'a, R, G> Sync for Fuse<'a, R, G> where
G: Sync,
G: Sync,
impl<'a, R, G> Unpin for Fuse<'a, R, G>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,