pub struct RouterService {
pub router: Router,
pub error_handler: fn(StatusCode) -> Response<Body>,
}
Expand description
The default simple router service.
Fields§
§router: Router
§error_handler: fn(StatusCode) -> Response<Body>
Implementations§
Source§impl RouterService
impl RouterService
pub fn new(router: Router) -> RouterService
Trait Implementations§
Source§impl Debug for RouterService
impl Debug for RouterService
Source§impl Service<Request<Body>> for RouterService
impl Service<Request<Body>> for RouterService
Source§type Future = Ready<Result<<RouterService as Service<Request<Body>>>::Response, <RouterService as Service<Request<Body>>>::Error>>
type Future = Ready<Result<<RouterService as Service<Request<Body>>>::Response, <RouterService as Service<Request<Body>>>::Error>>
The future response value.
Auto Trait Implementations§
impl Freeze for RouterService
impl RefUnwindSafe for RouterService
impl Send for RouterService
impl Sync for RouterService
impl Unpin for RouterService
impl UnwindSafe for RouterService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more