[][src]Enum proxy_protocol::binary::ProxyAddress

pub enum ProxyAddress {
    Unspec,
    IpV4 {
        source: [u8; 4],
        destination: [u8; 4],
    },
    IpV6 {
        source: [u8; 16],
        destination: [u8; 16],
    },
    UnixSocket {
        source: Vec<u8>,
        destination: Vec<u8>,
    },
}

Variants

Unspec
IpV4

Fields of IpV4

source: [u8; 4]destination: [u8; 4]
IpV6

Fields of IpV6

source: [u8; 16]destination: [u8; 16]
UnixSocket

Fields of UnixSocket

source: Vec<u8>destination: Vec<u8>

Methods

impl ProxyAddress[src]

pub fn from_ipaddr(first: IpAddr, second: IpAddr) -> Self[src]

pub fn read_addresses(
    family: ProxyAddressFamily,
    bytes: &mut Bytes
) -> Result<Self, BinaryParsingError>
[src]

pub fn family(&self) -> ProxyAddressFamily[src]

pub fn write(&self, buf: &mut BytesMut)[src]

Trait Implementations

impl Clone for ProxyAddress[src]

impl Debug for ProxyAddress[src]

impl Eq for ProxyAddress[src]

impl Hash for ProxyAddress[src]

impl PartialEq<ProxyAddress> for ProxyAddress[src]

impl StructuralEq for ProxyAddress[src]

impl StructuralPartialEq for ProxyAddress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.