Generator

Type Alias Generator 

Source
pub type Generator<'a, A, T> = GeneratorObj<'a, A, T, false>;
Expand description

the generator type, the functor passed to it must be Send

Aliased Type§

pub struct Generator<'a, A, T> { /* private fields */ }

Implementations§

Source§

impl<'a, A, T> Generator<'a, A, T>

Source

pub fn scoped_init<F>(&mut self, f: F)
where for<'scope> F: FnOnce(Scope<'scope, 'a, A, T>) -> T + Send + 'a, T: Send + 'a, A: Send + 'a,

init a heap based generator with scoped closure

Source

pub fn init_code<F: FnOnce() -> T + Send + 'a>(&mut self, f: F)
where T: Send + 'a,

init a heap based generator

Trait Implementations§

Source§

impl<A: Send, T: Send> Send for Generator<'static, A, T>