Struct unrest::Router
[−]
[src]
pub struct Router { /* fields omitted */ }
Methods
impl Router
[src]
fn new() -> Router
fn get(&mut self, route: &str, handler: Box<Handler + 'static>)
fn mount(&mut self, prefix: &str, handler: Box<Handler + 'static>)
fn run(
&self,
req: Request,
state: Container
) -> Result<Box<Future<Item = Response, Error = Error>>, Error>
&self,
req: Request,
state: Container
) -> Result<Box<Future<Item = Response, Error = Error>>, Error>
Trait Implementations
impl Clone for Router
[src]
fn clone(&self) -> Router
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more