Expand description
The source and destination address information for a given AddressFamily
.
Examples
use ppp::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
IPv4(IPv4)
IPv6(IPv6)
Unix(Unix)
Implementations
sourceimpl Addresses
impl Addresses
sourcepub fn address_family(&self) -> AddressFamily
pub fn address_family(&self) -> AddressFamily
The AddressFamily
for this Addresses
.
Trait Implementations
sourceimpl From<(SocketAddr, SocketAddr)> for Addresses
impl From<(SocketAddr, SocketAddr)> for Addresses
sourcefn from(addresses: (SocketAddr, SocketAddr)) -> Self
fn from(addresses: (SocketAddr, SocketAddr)) -> Self
Converts to this type from the input type.
sourceimpl WriteToHeader for Addresses
impl WriteToHeader for Addresses
impl Copy for Addresses
impl StructuralPartialEq for Addresses
Auto Trait Implementations
impl RefUnwindSafe for Addresses
impl Send for Addresses
impl Sync for Addresses
impl Unpin for Addresses
impl UnwindSafe for Addresses
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more