Trait fibers::Spawn [] [src]

pub trait Spawn {
    fn spawn_boxed(&self, fiber: BoxFuture<(), ()>);

    fn spawn<F>(&self, fiber: F) where F: Future<Item=(), Error=()> + Send + 'static { ... }
    fn spawn_fn<F, T>(&self, f: F) where F: FnOnce() -> T + Send + 'static,
              T: IntoFuture<Item=(), Error=()> + Send + 'static,
              T::Future: Send
{ ... } fn spawn_monitor<F, T, E>(&self, f: F) -> Monitor<T, E> where F: Future<Item=T, Error=E> + Send + 'static,
              T: Send + 'static,
              E: Send + 'static
{ ... } fn boxed(self) -> BoxSpawn where Self: Sized + Send + 'static { ... } }

The Spawn trait allows for spawning fibers.

Required Methods

Spawns a fiber which will execute given boxed future.

Provided Methods

Spawns a fiber which will execute given future.

Equivalent to self.spawn(futures::lazy(|| f())).

Spawns a fiber and returns a future to monitor it's execution result.

Converts this instance into a boxed object.

Implementors