[][src]Struct generator::Gn

pub struct Gn<A = ()> { /* fields omitted */ }

Generator helper

Methods

impl<A> Gn<A>[src]

pub fn new_scoped<'a, T, F>(f: F) -> Generator<'a, A, T> where
    F: FnOnce(Scope<A, T>) -> T + 'a,
    T: 'a,
    A: 'a, 
[src]

create a scoped generator with default stack size

pub fn new_scoped_opt<'a, T, F>(size: usize, f: F) -> Generator<'a, A, T> where
    F: FnOnce(Scope<A, T>) -> T + 'a,
    T: 'a,
    A: 'a, 
[src]

create a scoped generator with specified stack size

impl<A: Any> Gn<A>[src]

pub fn new<'a, T: Any, F>(f: F) -> Generator<'a, A, T> where
    F: FnOnce() -> T + 'a, 
[src]

Deprecated since 0.6.18:

please use scope version instead

create a new generator with default stack size

pub fn new_opt<'a, T: Any, F>(size: usize, f: F) -> Generator<'a, A, T> where
    F: FnOnce() -> T + 'a, 
[src]

create a new generator with specified stack size

Auto Trait Implementations

impl<A> Send for Gn<A> where
    A: Send

impl<A> Sync for Gn<A> where
    A: Sync

impl<A> Unpin for Gn<A> where
    A: Unpin

impl<A> UnwindSafe for Gn<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for Gn<A> where
    A: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]