RequestDispatcher

Trait RequestDispatcher 

Source
pub trait RequestDispatcher {
    // Required method
    fn handle(&self, request: Request) -> Option<Response>;
}

Required Methods§

Source

fn handle(&self, request: Request) -> Option<Response>

Executes the relevant application method based on the type of the request, and produces the corresponding response.

RequestDispatcher can indicate that it will no longer process new requests by returning None variant.

Implementors§