AsyncCommand

Trait AsyncCommand 

Source
pub trait AsyncCommand<C, R> {
    // Required method
    fn run<'life0, 'async_trait>(
        self,
        ctx: &'life0 mut C,
    ) -> Pin<Box<dyn Future<Output = Result<R>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The trait implemented by all command types in the hierarchy.

This trait is equivalent to the Command trait, but for async commands.

Required Methods§

Source

fn run<'life0, 'async_trait>( self, ctx: &'life0 mut C, ) -> Pin<Box<dyn Future<Output = Result<R>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§