pub struct RouterService { /* private fields */ }
Expand description
It defines the router service which is the main entry point for Hyper Server.
Implementations§
Source§impl RouterService
impl RouterService
Sourcepub fn new(handler: RequestHandler) -> Self
pub fn new(handler: RequestHandler) -> Self
Creates a new router service.
Trait Implementations§
Source§impl<T: Transport + Send + 'static> Service<&T> for RouterService
impl<T: Transport + Send + 'static> Service<&T> for RouterService
Source§type Response = RequestService
type Response = RequestService
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<RouterService as Service<&T>>::Response, <RouterService as Service<&T>>::Error>>
type Future = Ready<Result<<RouterService as Service<&T>>::Response, <RouterService as Service<&T>>::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