Struct axum::serve::IncomingStream
source · pub struct IncomingStream<'a> { /* private fields */ }
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