Trait RunClosure

Source
pub trait RunClosure {
    type Output: Deserialize + Serialize + 'static;
    type Fut: Future<Output = HandlerResult<Self::Output>>;

    // Required method
    fn run(self) -> Self::Fut;
}
Expand description

Run closure trait

Required Associated Types§

Source

type Output: Deserialize + Serialize + 'static

Source

type Fut: Future<Output = HandlerResult<Self::Output>>

Required Methods§

Source

fn run(self) -> Self::Fut

Implementors§

Source§

impl<F, O, Fut> RunClosure for F
where F: FnOnce() -> Fut, Fut: Future<Output = HandlerResult<O>>, O: Deserialize + Serialize + 'static,

Source§

type Output = O

Source§

type Fut = Fut