Struct hyper_middleware::Service
source · pub struct Service<H> { /* private fields */ }
Expand description
Hyper Service entry point which hosts a Handler
.
Implementations
Trait Implementations
sourceimpl<H> Service<&AddrStream> for Service<H>where
H: Handler,
impl<H> Service<&AddrStream> for Service<H>where
H: Handler,
type Response = HandlerService<H>
type Response = HandlerService<H>
Responses given by the service.
type Error = Infallible
type Error = Infallible
Errors produced by the service.
type Future = Ready<Result<<Service<H> as Service<&AddrStream>>::Response, <Service<H> as Service<&AddrStream>>::Error>>
type Future = Ready<Result<<Service<H> as Service<&AddrStream>>::Response, <Service<H> as Service<&AddrStream>>::Error>>
The future response value.
sourcefn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moresourcefn call(&mut self, conn: &AddrStream) -> Self::Future
fn call(&mut self, conn: &AddrStream) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations
impl<H> RefUnwindSafe for Service<H>where
H: RefUnwindSafe,
impl<H> Send for Service<H>where
H: Send + Sync,
impl<H> Sync for Service<H>where
H: Send + Sync,
impl<H> Unpin for Service<H>
impl<H> UnwindSafe for Service<H>where
H: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more