Struct rusty_express::prelude::Route
source · pub struct Route { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Router for Route
impl Router for Route
source§fn all(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
) -> &mut Route
fn all(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
) -> &mut Route
Function ‘all’ will match the uri on all request methods. Note that the “match all” paradigm is used in this framework as a safe fallback, which means that if a different callback has been defined for the same uri but under a explicitly defined request method (e.g. get, post, etc.), it will be matched and invoked instead of the “match all” callback functions.