pub enum AddressFamily {
Unspecified = 0,
IPv4 = 16,
IPv6 = 32,
Unix = 48,
}Expand description
The supported AddressFamily for a PROXY protocol header.
Variants§
Unspecified = 0
The address family is unspecified.
IPv4 = 16
The address family is IPv4.
IPv6 = 32
The address family is IPv6.
Unix = 48
The address family is Unix.
Implementations§
Source§impl AddressFamily
impl AddressFamily
Sourcepub fn byte_length(&self) -> Option<usize>
pub fn byte_length(&self) -> Option<usize>
The length in bytes for this AddressFamily.
AddressFamily::Unspecified does not require any bytes, and is represented as None.
Trait Implementations§
Source§impl BitOr<AddressFamily> for Protocol
impl BitOr<AddressFamily> for Protocol
Source§impl BitOr<Protocol> for AddressFamily
impl BitOr<Protocol> for AddressFamily
Source§impl Clone for AddressFamily
impl Clone for AddressFamily
impl Copy for AddressFamily
Source§impl Debug for AddressFamily
impl Debug for AddressFamily
impl Eq for AddressFamily
Source§impl From<AddressFamily> for u16
impl From<AddressFamily> for u16
Source§fn from(address_family: AddressFamily) -> Self
fn from(address_family: AddressFamily) -> Self
Converts to this type from the input type.
Source§impl Hash for AddressFamily
impl Hash for AddressFamily
Source§impl PartialEq for AddressFamily
impl PartialEq for AddressFamily
impl StructuralPartialEq for AddressFamily
Auto Trait Implementations§
impl Freeze for AddressFamily
impl RefUnwindSafe for AddressFamily
impl Send for AddressFamily
impl Sync for AddressFamily
impl Unpin for AddressFamily
impl UnsafeUnpin for AddressFamily
impl UnwindSafe for AddressFamily
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more