pub enum InetVersion {
V4,
V6,
}
Expand description
Assist in handling both IP version 4 and IP version 6.
Variants§
Implementations§
source§impl InetVersion
impl InetVersion
pub fn from_sockaddr(s: &SocketAddr) -> Self
Trait Implementations§
source§impl Clone for InetVersion
impl Clone for InetVersion
source§fn clone(&self) -> InetVersion
fn clone(&self) -> InetVersion
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 InetVersion
impl Debug for InetVersion
source§impl From<InetVersion> for sa_family_t
impl From<InetVersion> for sa_family_t
source§fn from(v: InetVersion) -> sa_family_t
fn from(v: InetVersion) -> sa_family_t
Converts to this type from the input type.
source§impl PartialEq for InetVersion
impl PartialEq for InetVersion
source§fn eq(&self, other: &InetVersion) -> bool
fn eq(&self, other: &InetVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for InetVersion
impl Eq for InetVersion
impl StructuralPartialEq for InetVersion
Auto Trait Implementations§
impl RefUnwindSafe for InetVersion
impl Send for InetVersion
impl Sync for InetVersion
impl Unpin for InetVersion
impl UnwindSafe for InetVersion
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