Trait bonsaidb::server::api::Handler[][src]

pub trait Handler<B, Api>: Send + Sync where
    B: Backend,
    Api: Api
{ fn handle<'life0, 'async_trait>(
        session: HandlerSession<'life0, B>,
        request: Api
    ) -> Pin<Box<dyn Future<Output = Result<<Api as Api>::Response, HandlerError<<Api as Api>::Error>>> + Send + 'async_trait, Global>>
        'life0: 'async_trait
; }
Expand description

A trait that can dispatch requests for a Api.

Required methods

Returns a dispatcher to handle custom api requests. The parameters are provided so that they can be cloned if needed during the processing of requests.