Struct generator::Scope
[−]
[src]
pub struct Scope<A, T> { /* fields omitted */ }
passed in scope tpye it not use the context to pass data, but keep it's own data ref this struct provide both compile type info and runtime data
Methods
impl<A, T> Scope<A, T>
[src]
fn new(para: *mut Option<A>, ret: *mut Option<T>) -> Self
[src]
create a new scope object
fn yield_with(&mut self, v: T)
[src]
yiled something without catch passed in para
fn get_yield(&mut self) -> Option<A>
[src]
get current generator send para
fn yield_(&mut self, v: T) -> Option<A>
[src]
yiled and get the send para
fn yield_from(&mut self, g: Box<GeneratorImpl<A, T>>) -> Option<A>
[src]
yiled_from
the from generator must has the same type as itself