Trait toku_server::RequestHandler[][src]

pub trait RequestHandler: Send + Sync + 'static {
    fn handle_request(
        &self,
        payload: Vec<u8>,
        encoding: &'static str
    ) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send>>;
fn handle_push(
        &self,
        payload: Vec<u8>,
        encoding: &'static str
    ) -> Pin<Box<dyn Future<Output = ()> + Send>>; }
Expand description

Trait implemented by servers for handling individual Requests and Pushes.

Required methods

Handle a single request. Return a future with the result.

Handle a single push.

Implementors