pub trait SpawnNamed: DynClone + Send + Sync {
    // Required methods
    fn spawn_blocking(
        &self,
        name: &'static str,
        group: Option<&'static str>,
        future: BoxFuture<'static, ()>
    );
    fn spawn(
        &self,
        name: &'static str,
        group: Option<&'static str>,
        future: BoxFuture<'static, ()>
    );
}
Expand description

Something that can spawn tasks (blocking and non-blocking) with an assigned name and optional group.

Required Methods§

source

fn spawn_blocking( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

Spawn the given blocking future.

The given group and name is used to identify the future in tracing.

source

fn spawn( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

Spawn the given non-blocking future.

The given group and name is used to identify the future in tracing.

Trait Implementations§

source§

impl<'clone> Clone for Box<dyn SpawnNamed + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn SpawnNamed + Send + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn SpawnNamed + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn SpawnNamed + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl SpawnNamed for Box<dyn SpawnNamed>

source§

fn spawn_blocking( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

Spawn the given blocking future. Read more
source§

fn spawn( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

Spawn the given non-blocking future. Read more

Implementations on Foreign Types§

source§

impl SpawnNamed for Box<dyn SpawnNamed>

source§

fn spawn_blocking( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

source§

fn spawn( &self, name: &'static str, group: Option<&'static str>, future: BoxFuture<'static, ()> )

Implementors§