Struct static_web_server::service::RouterService
source · 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
§type Response = RequestService
type Response = RequestService
Responses given by the service.
§type Error = Infallible
type Error = Infallible
Errors produced by the service.
§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 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