pub struct ProxyConnectInfo {
pub client_addr: SocketAddr,
pub peer_addr: SocketAddr,
pub proxy_info: Option<ProxyInfo>,
}Expand description
Connection metadata extracted from a Proxy Protocol header
Available without the axum feature; use
ProxiedStream::connect_info to build one from an accepted stream
Fields§
§client_addr: SocketAddrThe original client address (from a PP header or a TCP peer)
peer_addr: SocketAddrThe TCP peer address (the proxy’s address)
proxy_info: Option<ProxyInfo>Full Proxy Protocol info, if available
Implementations§
Trait Implementations§
Source§impl Clone for ProxyConnectInfo
impl Clone for ProxyConnectInfo
Source§fn clone(&self) -> ProxyConnectInfo
fn clone(&self) -> ProxyConnectInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyConnectInfo
impl Debug for ProxyConnectInfo
Source§impl Display for ProxyConnectInfo
impl Display for ProxyConnectInfo
Source§impl From<&ProxiedStream> for ProxyConnectInfo
impl From<&ProxiedStream> for ProxyConnectInfo
Source§fn from(stream: &ProxiedStream) -> Self
fn from(stream: &ProxiedStream) -> Self
Converts to this type from the input type.
Source§impl From<(ProxyInfo, SocketAddr)> for ProxyConnectInfo
impl From<(ProxyInfo, SocketAddr)> for ProxyConnectInfo
Source§fn from((info, peer_addr): (ProxyInfo, SocketAddr)) -> Self
fn from((info, peer_addr): (ProxyInfo, SocketAddr)) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddr> for ProxyConnectInfo
impl From<SocketAddr> for ProxyConnectInfo
Source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProxyConnectInfo
impl RefUnwindSafe for ProxyConnectInfo
impl Send for ProxyConnectInfo
impl Sync for ProxyConnectInfo
impl Unpin for ProxyConnectInfo
impl UnsafeUnpin for ProxyConnectInfo
impl UnwindSafe for ProxyConnectInfo
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