[−][src]Struct generator::Gn
Generator helper
Implementations
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]
F: FnOnce(Scope<A, T>) -> T + 'a,
T: 'a,
A: 'a,
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]
F: FnOnce(Scope<A, T>) -> T + 'a,
T: 'a,
A: 'a,
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]
F: FnOnce() -> T + 'a,
👎 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]
F: FnOnce() -> T + 'a,
create a new generator with specified stack size
Auto Trait Implementations
impl<A> RefUnwindSafe for Gn<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for Gn<A> where
A: Send,
A: Send,
impl<A> Sync for Gn<A> where
A: Sync,
A: Sync,
impl<A> Unpin for Gn<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for Gn<A> where
A: UnwindSafe,
A: UnwindSafe,
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,
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.
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>,