Trait axum::extract::connect_info::Connected
source · pub trait Connected<T>: Clone + Send + Sync + 'static {
// Required method
fn connect_info(target: T) -> Self;
}
Available on crate feature
tokio
only.Expand description
Trait that connected IO resources implement and use to produce information about the connection.
The goal for this trait is to allow users to implement custom IO types that can still provide the same connection metadata.
See Router::into_make_service_with_connect_info
for more details.
Required Methods§
sourcefn connect_info(target: T) -> Self
fn connect_info(target: T) -> Self
Create type holding information about the connection.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Connected<SocketAddr> for SocketAddr
impl Connected<SocketAddr> for SocketAddr
fn connect_info(remote_addr: SocketAddr) -> Self
source§impl Connected<IncomingStream<'_>> for SocketAddr
Available on crate features http1
or http2
only.
impl Connected<IncomingStream<'_>> for SocketAddr
Available on crate features
http1
or http2
only.