Type Alias generator::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§

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>