pub enum Addresses {
Unspecified,
IPv4(IPv4),
IPv6(IPv6),
Unix(Unix),
}
Expand description
The source and destination address information for a given AddressFamily
.
§Examples
use rama_haproxy::protocol::v2::{Addresses, AddressFamily};
use std::net::SocketAddr;
let addresses: Addresses = ("127.0.0.1:80".parse::<SocketAddr>().unwrap(), "192.168.1.1:443".parse::<SocketAddr>().unwrap()).into();
assert_eq!(addresses.address_family(), AddressFamily::IPv4);
Variants§
Unspecified
The source and destination addresses are unspecified.
IPv4(IPv4)
The source and destination addresses are IPv4.
IPv6(IPv6)
The source and destination addresses are IPv6.
Unix(Unix)
The source and destination addresses are Unix.
Implementations§
Source§impl Addresses
impl Addresses
Sourcepub fn address_family(&self) -> AddressFamily
pub fn address_family(&self) -> AddressFamily
The AddressFamily
for this Addresses
.
Trait Implementations§
Source§impl From<(SocketAddr, SocketAddr)> for Addresses
impl From<(SocketAddr, SocketAddr)> for Addresses
Source§fn from(addresses: (SocketAddr, SocketAddr)) -> Self
fn from(addresses: (SocketAddr, SocketAddr)) -> Self
Converts to this type from the input type.
Source§impl WriteToHeader for Addresses
impl WriteToHeader for Addresses
impl Copy for Addresses
impl Eq for Addresses
impl StructuralPartialEq for Addresses
Auto Trait Implementations§
impl Freeze for Addresses
impl RefUnwindSafe for Addresses
impl Send for Addresses
impl Sync for Addresses
impl Unpin for Addresses
impl UnwindSafe for Addresses
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