pub struct IncomingStream<'a> { /* private fields */ }
Available on crate feature
tokio
and (crate features http1
or http2
) only.Expand description
An incoming stream.
Used with serve
and IntoMakeServiceWithConnectInfo
.
Implementations§
Source§impl IncomingStream<'_>
impl IncomingStream<'_>
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Returns the local address that this stream is bound to.
Sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
Returns the remote address that this stream is bound to.
Trait Implementations§
Source§impl Connected<IncomingStream<'_>> for SocketAddr
impl Connected<IncomingStream<'_>> for SocketAddr
Source§fn connect_info(target: IncomingStream<'_>) -> Self
fn connect_info(target: IncomingStream<'_>) -> Self
Create type holding information about the connection.
Source§impl<'a> Debug for IncomingStream<'a>
impl<'a> Debug for IncomingStream<'a>
Source§impl<H, T, S> Service<IncomingStream<'_>> for HandlerService<H, T, S>
impl<H, T, S> Service<IncomingStream<'_>> 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<'_>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
The future response value.
Source§impl Service<IncomingStream<'_>> for MethodRouter<()>
impl Service<IncomingStream<'_>> for MethodRouter<()>
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<'_>>>::Response, <MethodRouter as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<MethodRouter as Service<IncomingStream<'_>>>::Response, <MethodRouter as Service<IncomingStream<'_>>>::Error>>
The future response value.
Source§impl Service<IncomingStream<'_>> for Router<()>
impl Service<IncomingStream<'_>> for Router<()>
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<Router as Service<IncomingStream<'_>>>::Response, <Router as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<Router as Service<IncomingStream<'_>>>::Response, <Router as Service<IncomingStream<'_>>>::Error>>
The future response value.
Auto Trait Implementations§
impl<'a> Freeze for IncomingStream<'a>
impl<'a> RefUnwindSafe for IncomingStream<'a>
impl<'a> Send for IncomingStream<'a>
impl<'a> Sync for IncomingStream<'a>
impl<'a> Unpin for IncomingStream<'a>
impl<'a> UnwindSafe for IncomingStream<'a>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes