Trait ServiceWithClient

Source
pub trait ServiceWithClient {
    type RequestFuture: Future<Output = Result<Value, Value>> + 'static + Send;

    // Required methods
    fn handle_request(
        &mut self,
        client: &mut Client,
        method: &str,
        params: &[Value],
    ) -> Self::RequestFuture;
    fn handle_notification(
        &mut self,
        client: &mut Client,
        method: &str,
        params: &[Value],
    );
}

Required Associated Types§

Source

type RequestFuture: Future<Output = Result<Value, Value>> + 'static + Send

Required Methods§

Source

fn handle_request( &mut self, client: &mut Client, method: &str, params: &[Value], ) -> Self::RequestFuture

Source

fn handle_notification( &mut self, client: &mut Client, method: &str, params: &[Value], )

Implementors§