Trait nip_55::json_rpc::JsonRpcServerHandler

source ·
pub trait JsonRpcServerHandler<Request: AsRef<JsonRpcRequest> + Send + 'static = JsonRpcRequest>: Send + Sync {
    // Required method
    fn handle_batch_request<'life0, 'async_trait>(
        &'life0 self,
        requests: Vec<Request>
    ) -> Pin<Box<dyn Future<Output = Vec<JsonRpcResponseData>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn handle_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request
    ) -> Pin<Box<dyn Future<Output = JsonRpcResponseData> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn handle_batch_request<'life0, 'async_trait>( &'life0 self, requests: Vec<Request> ) -> Pin<Box<dyn Future<Output = Vec<JsonRpcResponseData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn handle_request<'life0, 'async_trait>( &'life0 self, request: Request ) -> Pin<Box<dyn Future<Output = JsonRpcResponseData> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§