Trait saphir::Controller [−][src]
pub trait Controller: Send + Sync { fn handle(&self, req: &SyncRequest, res: &mut SyncResponse); }
Trait representing a controller
Required Methods
fn handle(&self, req: &SyncRequest, res: &mut SyncResponse)
Method invoked if the request gets routed to this controller. Nothing will be processed after a controller handling
a request.
When returning from this function, the res
param is the response returned to the client.
Implementors
impl<C: Send + Sync> Controller for BasicController<C>