[−][src]Struct generator_extensions::Gen
A newtype wrapper for built-in generators which provides an implementation
of the IntoGenerator
trait.
See the IntoGenerator
trait documentation for more details.
Implementations
impl<R, G: Generator<R>> Gen<R, G>
[src]
#[must_use]pub fn new(gen: G) -> Self
[src]
Wraps a generator.
#[must_use]pub fn as_pinned(self: Pin<&mut Self>) -> Pin<&mut G>
[src]
Projects a pinned Gen
as its wrapped generator.
#[must_use]pub fn into_inner(self) -> G
[src]
Retrieves the wrapped generator.
Trait Implementations
impl<R, G: Generator<R> + Debug> Debug for Gen<R, G>
[src]
impl<R, G: Generator<R>> From<G> for Gen<R, G>
[src]
impl<R, G: Generator<R>> Generator<R> for Gen<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 = G::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>
impl<R, G: Generator<R>> IntoGenerator for Gen<R, G>
[src]
Auto Trait Implementations
impl<R, G> Send for Gen<R, G> where
G: Send,
G: Send,
impl<R, G> Sync for Gen<R, G> where
G: Sync,
G: Sync,
impl<R, G> Unpin for Gen<R, G> where
G: Unpin,
G: Unpin,
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<!> for 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>,