Struct hyper_router::RouterService
[−]
[src]
pub struct RouterService { pub router: Router, pub error_handler: fn(_: StatusCode) -> Response, }
The default simple router service.
Fields
router: Router
error_handler: fn(_: StatusCode) -> Response
Methods
impl RouterService
[src]
pub fn new(router: Router) -> RouterService
[src]
Trait Implementations
impl Debug for RouterService
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Service for RouterService
[src]
type Request = Request
Requests handled by the service.
type Response = Response
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = FutureResult<Response, Error>
The future response value.
fn call(&self, request: Request) -> Self::Future
[src]
Process the request and return the response asynchronously.