[][src]Trait kayrx_karx::futures::Spawner

pub trait Spawner {
    fn spawn(&mut self, fut: BoxFuture<'static, ()>) -> Result<()>;
fn spawn_local(&mut self, fut: LocalBoxFuture<'static, ()>) -> Result<()>;
fn spawn_blocking(
        &mut self,
        f: Box<dyn FnOnce() + Send + 'static>
    ) -> Result<()>; }

The value for spawning cases.

Required methods

fn spawn(&mut self, fut: BoxFuture<'static, ()>) -> Result<()>

Spawn a task to execute a case.

fn spawn_local(&mut self, fut: LocalBoxFuture<'static, ()>) -> Result<()>

Spawn a task to execute a case onto the current thread.

fn spawn_blocking(
    &mut self,
    f: Box<dyn FnOnce() + Send + 'static>
) -> Result<()>

Spawn a task to execute a case which may block the running thread.

Loading content...

Implementations on Foreign Types

impl<'_, T: ?Sized> Spawner for &'_ mut T where
    T: Spawner
[src]

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

Loading content...

Implementors

Loading content...