pub struct ProxyInfo {
pub version: Version,
pub command: Command,
pub transport: Option<Transport>,
pub source: Option<ProxyAddress>,
pub destination: Option<ProxyAddress>,
pub tlvs: Tlvs,
}Expand description
Parsed Proxy Protocol header
Fields§
§version: VersionProtocol version (V1 or V2)
command: CommandPROXY (forwarded) or LOCAL (health-check)
transport: Option<Transport>Transport family and protocol of the original connection;
None for LOCAL commands and UNKNOWN v1 lines
source: Option<ProxyAddress>Original source (client) address; None for LOCAL commands
destination: Option<ProxyAddress>Original destination address; None for LOCAL commands
tlvs: TlvsParsed TLV extensions (v2 only)
Implementations§
Source§impl ProxyInfo
impl ProxyInfo
Sourcepub fn source_inet(&self) -> Option<SocketAddr>
pub fn source_inet(&self) -> Option<SocketAddr>
Convenience: source as SocketAddr (IPv4/IPv6 only)
Sourcepub fn destination_inet(&self) -> Option<SocketAddr>
pub fn destination_inet(&self) -> Option<SocketAddr>
Convenience: destination as SocketAddr (IPv4/IPv6 only)
Sourcepub fn destination_ip(&self) -> Option<IpAddr>
pub fn destination_ip(&self) -> Option<IpAddr>
Convenience: destination IP address, if Inet
Trait Implementations§
impl Eq for ProxyInfo
impl StructuralPartialEq for ProxyInfo
Auto Trait Implementations§
impl Freeze for ProxyInfo
impl RefUnwindSafe for ProxyInfo
impl Send for ProxyInfo
impl Sync for ProxyInfo
impl Unpin for ProxyInfo
impl UnsafeUnpin for ProxyInfo
impl UnwindSafe for ProxyInfo
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