[][src]Struct generator::Scope

pub struct Scope<'a, A, T> { /* fields omitted */ }

passed in scope type 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, A, T> Scope<'a, A, T>[src]

pub fn yield_with(&mut self, v: T)[src]

yield something without catch passed in para

pub fn get_yield(&mut self) -> Option<A>[src]

get current generator send para

pub fn yield_(&mut self, v: T) -> Option<A>[src]

yield and get the send para

pub fn yield_from(&mut self, g: Box<GeneratorImpl<A, T>>) -> Option<A>[src]

yield_from the from generator must has the same type as itself

Auto Trait Implementations

impl<'a, A, T> Send for Scope<'a, A, T> where
    A: Send,
    T: Send

impl<'a, A, T> Unpin for Scope<'a, A, T>

impl<'a, A, T> Sync for Scope<'a, A, T> where
    A: Sync,
    T: Sync

impl<'a, A, T> !UnwindSafe for Scope<'a, A, T>

impl<'a, A, T> RefUnwindSafe for Scope<'a, A, T> where
    A: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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