pub struct IncomingStream<'a, L>where
L: Listener,{ /* private fields */ }
Expand description
An incoming stream.
Used with serve
and IntoMakeServiceWithConnectInfo
.
Implementations§
Trait Implementations§
Source§impl Connected<IncomingStream<'_, TcpListener>> for SocketAddr
impl Connected<IncomingStream<'_, TcpListener>> for SocketAddr
Source§fn connect_info(stream: IncomingStream<'_, TcpListener>) -> SocketAddr
fn connect_info(stream: IncomingStream<'_, TcpListener>) -> SocketAddr
Create type holding information about the connection.
Source§impl<'a, L, F> Connected<IncomingStream<'a, TapIo<L, F>>> for <L as Listener>::Addr
impl<'a, L, F> Connected<IncomingStream<'a, TapIo<L, F>>> for <L as Listener>::Addr
Source§fn connect_info(
stream: IncomingStream<'a, TapIo<L, F>>,
) -> <L as Listener>::Addr
fn connect_info( stream: IncomingStream<'a, TapIo<L, F>>, ) -> <L as Listener>::Addr
Create type holding information about the connection.
Source§impl<'a, L> Debug for IncomingStream<'a, L>
impl<'a, L> Debug for IncomingStream<'a, L>
Source§impl<H, T, S, L> Service<IncomingStream<'_, L>> for HandlerService<H, T, S>
impl<H, T, S, L> Service<IncomingStream<'_, L>> for HandlerService<H, T, S>
Source§type Response = HandlerService<H, T, S>
type Response = HandlerService<H, T, S>
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Error>>
type Future = Ready<Result<<HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_, L>,
) -> <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Future
fn call( &mut self, _req: IncomingStream<'_, L>, ) -> <HandlerService<H, T, S> as Service<IncomingStream<'_, L>>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<L> Service<IncomingStream<'_, L>> for MethodRouterwhere
L: Listener,
impl<L> Service<IncomingStream<'_, L>> for MethodRouterwhere
L: Listener,
Source§type Response = MethodRouter
type Response = MethodRouter
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<MethodRouter as Service<IncomingStream<'_, L>>>::Response, <MethodRouter as Service<IncomingStream<'_, L>>>::Error>>
type Future = Ready<Result<<MethodRouter as Service<IncomingStream<'_, L>>>::Response, <MethodRouter as Service<IncomingStream<'_, L>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <MethodRouter as Service<IncomingStream<'_, L>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <MethodRouter as Service<IncomingStream<'_, L>>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_, L>,
) -> <MethodRouter as Service<IncomingStream<'_, L>>>::Future
fn call( &mut self, _req: IncomingStream<'_, L>, ) -> <MethodRouter as Service<IncomingStream<'_, L>>>::Future
Process the request and return the response asynchronously. Read more
Source§impl<L> Service<IncomingStream<'_, L>> for Routerwhere
L: Listener,
impl<L> Service<IncomingStream<'_, L>> for Routerwhere
L: Listener,
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<Router as Service<IncomingStream<'_, L>>>::Response, <Router as Service<IncomingStream<'_, L>>>::Error>>
type Future = Ready<Result<<Router as Service<IncomingStream<'_, L>>>::Response, <Router as Service<IncomingStream<'_, L>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <Router as Service<IncomingStream<'_, L>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <Router as Service<IncomingStream<'_, L>>>::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_, L>,
) -> <Router as Service<IncomingStream<'_, L>>>::Future
fn call( &mut self, _req: IncomingStream<'_, L>, ) -> <Router as Service<IncomingStream<'_, L>>>::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<'a, L> Freeze for IncomingStream<'a, L>
impl<'a, L> RefUnwindSafe for IncomingStream<'a, L>
impl<'a, L> Send for IncomingStream<'a, L>
impl<'a, L> Sync for IncomingStream<'a, L>
impl<'a, L> Unpin for IncomingStream<'a, L>
impl<'a, L> UnwindSafe for IncomingStream<'a, L>
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> 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 more