pub struct H1ServiceHandler<T, S: Service, B, X: Service, U: Service> { /* private fields */ }Expand description
Service implementation for HTTP1 transport
Trait Implementations§
Source§impl<T, S, B, X, U> Service for H1ServiceHandler<T, S, B, X, U>where
T: AsyncRead + AsyncWrite + Unpin,
S: Service<Request = Request>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
B: MessageBody,
X: Service<Request = Request, Response = Request>,
X::Error: Into<Error>,
U: Service<Request = (Request, Framed<T, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
impl<T, S, B, X, U> Service for H1ServiceHandler<T, S, B, X, U>where
T: AsyncRead + AsyncWrite + Unpin,
S: Service<Request = Request>,
S::Error: Into<Error>,
S::Response: Into<Response<B>>,
B: MessageBody,
X: Service<Request = Request, Response = Request>,
X::Error: Into<Error>,
U: Service<Request = (Request, Framed<T, Codec>), Response = ()>,
U::Error: Display + Into<Error>,
Source§type Request = (T, Option<SocketAddr>)
type Request = (T, Option<SocketAddr>)
Requests handled by the service.
Source§type Error = DispatchError
type Error = DispatchError
Errors produced by the service.
Source§type Future = Dispatcher<T, S, B, X, U>
type Future = Dispatcher<T, S, B, X, U>
The future response value.
Source§fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moreSource§fn call(&mut self, (io, addr): Self::Request) -> Self::Future
fn call(&mut self, (io, addr): Self::Request) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<T, S, B, X, U> Freeze for H1ServiceHandler<T, S, B, X, U>
impl<T, S, B, X, U> !RefUnwindSafe for H1ServiceHandler<T, S, B, X, U>
impl<T, S, B, X, U> !Send for H1ServiceHandler<T, S, B, X, U>
impl<T, S, B, X, U> !Sync for H1ServiceHandler<T, S, B, X, U>
impl<T, S, B, X, U> Unpin for H1ServiceHandler<T, S, B, X, U>
impl<T, S, B, X, U> !UnwindSafe for H1ServiceHandler<T, S, B, X, U>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoService<T> for Twhere
T: Service,
impl<T> IntoService<T> for Twhere
T: Service,
Source§fn into_service(self) -> T
fn into_service(self) -> T
Convert to a
Service