#[non_exhaustive]pub enum ProxyAddress {
Inet(SocketAddr),
Unix(Vec<u8>),
}Expand description
An address from a Proxy Protocol header
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inet(SocketAddr)
IPv4 or IPv6 socket address (IP + port)
Unix(Vec<u8>)
Unix domain socket path (up to 108 bytes per the v2 spec)
Implementations§
Source§impl ProxyAddress
impl ProxyAddress
Trait Implementations§
Source§impl Clone for ProxyAddress
impl Clone for ProxyAddress
Source§fn clone(&self) -> ProxyAddress
fn clone(&self) -> ProxyAddress
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 ProxyAddress
impl Debug for ProxyAddress
Source§impl Display for ProxyAddress
impl Display for ProxyAddress
Source§impl From<SocketAddr> for ProxyAddress
impl From<SocketAddr> for ProxyAddress
Source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddrV4> for ProxyAddress
impl From<SocketAddrV4> for ProxyAddress
Source§fn from(addr: SocketAddrV4) -> Self
fn from(addr: SocketAddrV4) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddrV6> for ProxyAddress
impl From<SocketAddrV6> for ProxyAddress
Source§fn from(addr: SocketAddrV6) -> Self
fn from(addr: SocketAddrV6) -> Self
Converts to this type from the input type.
Source§impl Hash for ProxyAddress
impl Hash for ProxyAddress
Source§impl PartialEq for ProxyAddress
impl PartialEq for ProxyAddress
impl Eq for ProxyAddress
impl StructuralPartialEq for ProxyAddress
Auto Trait Implementations§
impl Freeze for ProxyAddress
impl RefUnwindSafe for ProxyAddress
impl Send for ProxyAddress
impl Sync for ProxyAddress
impl Unpin for ProxyAddress
impl UnsafeUnpin for ProxyAddress
impl UnwindSafe for ProxyAddress
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