Trait rustful::handler::Handler
[−]
[src]
pub trait Handler: Send + Sync + 'static { fn handle_request(&self, context: Context, response: Response); fn description(&self) -> Option<Cow<'static, str>> { ... } }
A trait for request handlers.
Required Methods
fn handle_request(&self, context: Context, response: Response)
Handle a request from the client. Panicking within this method is discouraged, to allow the server to run smoothly.
Provided Methods
fn description(&self) -> Option<Cow<'static, str>>
Get a description for the handler.