Command

Trait Command 

Source
pub trait Command<R: Request>: Any + Send {
    type Output: Any + Send
       where Self: Sized;

    // Required method
    fn run(self, ctx: Context<R>) -> impl Future<Output = Self::Output> + Send
       where Self: Sized;
}

Required Associated Types§

Source

type Output: Any + Send where Self: Sized

Required Methods§

Source

fn run(self, ctx: Context<R>) -> impl Future<Output = Self::Output> + Send
where Self: Sized,

Implementations on Foreign Types§

Source§

impl<R: Request> Command<R> for Box<dyn AnyCommand<R>>

Source§

type Output = Box<dyn Any + Send>

Source§

fn run(self, ctx: Context<R>) -> impl Future<Output = Self::Output>

Source§

impl<R: Request, C: Command<R>> Command<R> for Vec<C>

Source§

type Output = Vec<<C as Command<R>>::Output>

Source§

async fn run(self, ctx: Context<R>) -> Self::Output

Source§

impl<R: Request, Output: Any + Send> Command<R> for Box<dyn _Command<R, Output>>

Source§

type Output = Box<dyn Any + Send>

Source§

async fn run(self, ctx: Context<R>) -> Self::Output

Source§

impl<R: Request, T0: Any + Send, T1: Any + Send, T2: Any + Send, T3: Any + Send, T4: Any + Send, T5: Any + Send, T6: Any + Send, T7: Any + Send, M0: Command<R, Output = T0> + 'static, M1: Command<R, Output = T1> + 'static, M2: Command<R, Output = T2> + 'static, M3: Command<R, Output = T3> + 'static, M4: Command<R, Output = T4> + 'static, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M0, M1, M2, M3, M4, M5, M6, M7)

Source§

impl<R: Request, T1: Any + Send, T2: Any + Send, T3: Any + Send, T4: Any + Send, T5: Any + Send, T6: Any + Send, T7: Any + Send, M1: Command<R, Output = T1> + 'static, M2: Command<R, Output = T2> + 'static, M3: Command<R, Output = T3> + 'static, M4: Command<R, Output = T4> + 'static, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M1, M2, M3, M4, M5, M6, M7)

Source§

impl<R: Request, T2: Any + Send, T3: Any + Send, T4: Any + Send, T5: Any + Send, T6: Any + Send, T7: Any + Send, M2: Command<R, Output = T2> + 'static, M3: Command<R, Output = T3> + 'static, M4: Command<R, Output = T4> + 'static, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M2, M3, M4, M5, M6, M7)

Source§

impl<R: Request, T3: Any + Send, T4: Any + Send, T5: Any + Send, T6: Any + Send, T7: Any + Send, M3: Command<R, Output = T3> + 'static, M4: Command<R, Output = T4> + 'static, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M3, M4, M5, M6, M7)

Source§

impl<R: Request, T4: Any + Send, T5: Any + Send, T6: Any + Send, T7: Any + Send, M4: Command<R, Output = T4> + 'static, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M4, M5, M6, M7)

Source§

impl<R: Request, T5: Any + Send, T6: Any + Send, T7: Any + Send, M5: Command<R, Output = T5> + 'static, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M5, M6, M7)

Source§

impl<R: Request, T6: Any + Send, T7: Any + Send, M6: Command<R, Output = T6> + 'static, M7: Command<R, Output = T7> + 'static> Command<R> for (M6, M7)

Source§

type Output = (T6, T7)

Source§

async fn run(self, ctx: Context<R>) -> (T6, T7)

Implementors§

Source§

impl<R: Request> Command<R> for R