Skip to main content

PathHandler

Trait PathHandler 

Source
pub trait PathHandler: Send + Sync {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        request: PathRequest,
        context: PathInvocationContext,
    ) -> Pin<Box<dyn Future<Output = Result<Value, MdpClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, request: PathRequest, context: PathInvocationContext, ) -> Pin<Box<dyn Future<Output = Result<Value, MdpClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<F, Fut> PathHandler for F
where F: Send + Sync + 'static + Fn(PathRequest, PathInvocationContext) -> Fut, Fut: Future<Output = Result<Value, MdpClientError>> + Send + 'static,