Trait Spawnable

Source
pub trait Spawnable {
    type Output;

    // Required method
    fn into_task(self, scope: ScopeHandle) -> AtomicFutureHandle<'static>;
}
Expand description

Trait for things that can be spawned on to a scope. There is a blanket implementation below for futures.

Required Associated Types§

Source

type Output

The type of value produced on completion.

Required Methods§

Source

fn into_task(self, scope: ScopeHandle) -> AtomicFutureHandle<'static>

Converts to a task that can be spawned directly.

Implementors§

Source§

impl<F: Future + Send + 'static> Spawnable for F
where F::Output: Send + 'static,

Source§

impl<O> Spawnable for SpawnableFuture<'static, O>