Trait Procedure

Source
pub trait Procedure<Cx: TripleS + Clone, Output: Send + Sync + Serialize + Type, Arg: Send + Sync + DeserializeOwned + Type> {
    // Required method
    fn exec<'life0, 'async_trait>(
        &'life0 self,
        cx: Cx,
        data: Arg,
    ) -> Pin<Box<dyn Future<Output = Output> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A procedure.

Required Methods§

Source

fn exec<'life0, 'async_trait>( &'life0 self, cx: Cx, data: Arg, ) -> Pin<Box<dyn Future<Output = Output> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run this procedure with its context and data.

Implementors§

Source§

impl<Cx: TripleS + Clone, Output: Send + Sync + Serialize + Type, Fut: Future<Output = Output> + Send, Arg: Send + Sync + 'static + DeserializeOwned + Type, Func: Fn(Cx, Arg) -> Fut + Send + Sync + 'static> Procedure<Cx, Output, Arg> for Func