#[non_exhaustive]pub enum ProxyAddress<'a> {
Ip(SocketAddr),
Unix(&'a [u8]),
}Available on crate feature
proxy only.Expand description
An address in a PROXY 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.
Ip(SocketAddr)
An IP address and port.
Unix(&'a [u8])
A Unix socket path (v2 only), with trailing zero bytes removed.
Implementations§
Source§impl ProxyAddress<'_>
impl ProxyAddress<'_>
Sourcepub fn socket_addr(&self) -> Option<SocketAddr>
pub fn socket_addr(&self) -> Option<SocketAddr>
The IP socket address, if this is one.
Trait Implementations§
Source§impl<'a> Clone for ProxyAddress<'a>
impl<'a> Clone for ProxyAddress<'a>
impl<'a> Copy for ProxyAddress<'a>
Source§impl<'a> Debug for ProxyAddress<'a>
impl<'a> Debug for ProxyAddress<'a>
Source§impl Display for ProxyAddress<'_>
impl Display for ProxyAddress<'_>
impl<'a> Eq for ProxyAddress<'a>
Source§impl<'a> PartialEq for ProxyAddress<'a>
impl<'a> PartialEq for ProxyAddress<'a>
impl<'a> StructuralPartialEq for ProxyAddress<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProxyAddress<'a>
impl<'a> RefUnwindSafe for ProxyAddress<'a>
impl<'a> Send for ProxyAddress<'a>
impl<'a> Sync for ProxyAddress<'a>
impl<'a> Unpin for ProxyAddress<'a>
impl<'a> UnsafeUnpin for ProxyAddress<'a>
impl<'a> UnwindSafe for ProxyAddress<'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