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
Source§fn clone(&self) -> AddressFamily
fn clone(&self) -> AddressFamily
Returns a copy 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 AddressFamily
impl Debug 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 Copy for AddressFamily
impl Eq 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 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