pub enum AddressFamily {
Ipv4,
Ipv6,
}
Expand description
Address families supported by TcpListenerExt::new
and
UdpSocketExt::new
.
Variants§
Implementations§
Source§impl AddressFamily
impl AddressFamily
Sourcepub fn of_ip_addr(ip_addr: IpAddr) -> Self
pub fn of_ip_addr(ip_addr: IpAddr) -> Self
Return the AddressFamily
of an IP address.
Sourcepub fn of_socket_addr(socket_addr: SocketAddr) -> Self
pub fn of_socket_addr(socket_addr: SocketAddr) -> Self
Return the AddressFamily
of a socket address.
Trait Implementations§
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 AddressFamily
impl From<AddressFamily> for AddressFamily
Source§fn from(address_family: AddressFamily) -> Self
fn from(address_family: AddressFamily) -> Self
Converts to this type from the input type.
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