[][src]Trait executor_trait::LocalExecutor

pub trait LocalExecutor {
    pub fn spawn_local<T: 'static>(
        &self,
        f: Pin<Box<dyn Future<Output = T>>>
    ) -> Box<dyn Task<T>>; }

A common interface for spawning non-Send futures on top of an executor, on the current thread

Required methods

pub fn spawn_local<T: 'static>(
    &self,
    f: Pin<Box<dyn Future<Output = T>>>
) -> Box<dyn Task<T>>
[src]

Spawn a non-Send future on the current thread and return a handle to get its result on completion.

Dropping the handle will cancel the future. You can call detach() to let it run without waiting for its completion.

Loading content...

Implementors

impl<E: Deref> LocalExecutor for E where
    E::Target: LocalExecutor
[src]

Loading content...