pub enum IpAddr {
V4(IpAddrV4),
V6(IpAddrV6),
}
Expand description
Implements version-independent IP addresses.
Variants§
Implementations§
Source§impl IpAddr
impl IpAddr
Sourcepub fn is_unspecified(&self) -> bool
pub fn is_unspecified(&self) -> bool
Return true if this is unspecified address.
Sourcepub fn is_loopback(&self) -> bool
pub fn is_loopback(&self) -> bool
Return true if this is loopback address.
Sourcepub fn is_multicast(&self) -> bool
pub fn is_multicast(&self) -> bool
Return true if this is multicast address.
Trait Implementations§
Source§impl AddAssign<i64> for IpAddr
impl AddAssign<i64> for IpAddr
Source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
Performs the
+=
operation. Read moreSource§impl<'a, P: Protocol> IntoEndpoint<P> for &'a IpAddr
impl<'a, P: Protocol> IntoEndpoint<P> for &'a IpAddr
fn into_endpoint(self, port: u16) -> IpEndpoint<P>
Source§impl<P: Protocol> IntoEndpoint<P> for IpAddr
impl<P: Protocol> IntoEndpoint<P> for IpAddr
fn into_endpoint(self, port: u16) -> IpEndpoint<P>
Source§impl Ord for IpAddr
impl Ord for IpAddr
Source§impl PartialOrd for IpAddr
impl PartialOrd for IpAddr
Source§impl SubAssign<i64> for IpAddr
impl SubAssign<i64> for IpAddr
Source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
Performs the
-=
operation. Read moreimpl Eq for IpAddr
impl StructuralPartialEq for IpAddr
Auto Trait Implementations§
impl Freeze for IpAddr
impl RefUnwindSafe for IpAddr
impl Send for IpAddr
impl Sync for IpAddr
impl Unpin for IpAddr
impl UnwindSafe for IpAddr
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