Trait Task0

Source
pub trait Task0<O>: Debug {
    // Required method
    fn run<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<O>> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided methods
    fn name(&self) -> String { ... }
    fn color(&self) -> Option<Rgba> { ... }
}

Required Methods§

Source

fn run<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<O>> + Send + 'async_trait>>
where Self: 'async_trait,

Provided Methods§

Source

fn name(&self) -> String

Source

fn color(&self) -> Option<Rgba>

Implementors§

Source§

impl<O> Task0<O> for Input<O>
where O: Debug + Send + 'static,

Implements the Task trait for task inputs.

All that this implementation does is return a shared reference to the task input.