Trait drone_core::fib::ThrFiberGen[][src]

pub trait ThrFiberGen: ThrToken {
    fn add<G>(self, gen: G)
    where
        G: Generator<Yield = (), Return = ()>,
        G: Send + 'static
, { ... }
fn add_factory<C, G>(self, factory: C)
    where
        C: FnOnce() -> G + Send + 'static,
        G: Generator<Yield = (), Return = ()>,
        G: 'static
, { ... } }

Extends ThrToken types with add and add_factory methods.

Provided methods

fn add<G>(self, gen: G) where
    G: Generator<Yield = (), Return = ()>,
    G: Send + 'static, 
[src]

Adds a fiber for the generator gen to the fiber chain.

fn add_factory<C, G>(self, factory: C) where
    C: FnOnce() -> G + Send + 'static,
    G: Generator<Yield = (), Return = ()>,
    G: 'static, 
[src]

Adds a fiber for the generator returned by factory to the fiber chain.

This method is useful for non-Send fibers.

Loading content...

Implementors

impl<T: ThrToken> ThrFiberGen for T[src]

Loading content...