Struct mendes::hyper::ApplicationService
source · pub struct ApplicationService<A>(/* private fields */);
Available on crate feature
hyper
only.Expand description
ApplicationService
wraps an Arc<Application>
to implement the service trait used in hyper
Trait Implementations§
source§impl<'t, A: Application> Service<&'t AddrStream> for ApplicationService<A>
impl<'t, A: Application> Service<&'t AddrStream> for ApplicationService<A>
§type Response = ConnectionService<A>
type Response = ConnectionService<A>
Responses given by the service.
§type Future = Ready<Result<<ApplicationService<A> as Service<&'t AddrStream>>::Response, <ApplicationService<A> as Service<&'t AddrStream>>::Error>>
type Future = Ready<Result<<ApplicationService<A> as Service<&'t AddrStream>>::Response, <ApplicationService<A> as Service<&'t AddrStream>>::Error>>
The future response value.
source§fn 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 moresource§fn call(&mut self, conn: &'t AddrStream) -> Self::Future
fn call(&mut self, conn: &'t AddrStream) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<A> RefUnwindSafe for ApplicationService<A>where
A: RefUnwindSafe,
impl<A> Send for ApplicationService<A>
impl<A> Sync for ApplicationService<A>
impl<A> Unpin for ApplicationService<A>
impl<A> UnwindSafe for ApplicationService<A>where
A: RefUnwindSafe,
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