Trait rustful::handler::Handler
[−]
[src]
pub trait Handler: Send + Sync + 'static { fn handle(&self, context: Context, response: Response); fn description(&self) -> Option<Cow<'static, str>> { ... } }
A trait for request handlers.
Required Methods
fn handle(&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.
Implementations on Foreign Types
impl<T: Handler> Handler for Arc<T>
[src]
impl<T: Handler> Handler for Arc<T>
impl Handler for Box<Handler>
[src]
impl Handler for Box<Handler>