Enum rkyv::net::ArchivedIpAddr
source · [−]#[repr(u8)]
pub enum ArchivedIpAddr {
V4(ArchivedIpv4Addr),
V6(ArchivedIpv6Addr),
}
Expand description
An archived IpAddr
.
Variants
V4(ArchivedIpv4Addr)
An IPv4 address.
V6(ArchivedIpv6Addr)
An IPv6 address.
Implementations
sourceimpl ArchivedIpAddr
impl ArchivedIpAddr
sourcepub const fn is_loopback(&self) -> bool
pub const fn is_loopback(&self) -> bool
Returns true
if this is a loopback address.
See IpAddr::is_loopback()
for more details.
sourcepub const fn is_multicast(&self) -> bool
pub const fn is_multicast(&self) -> bool
Returns true
if this is a multicast address.
See IpAddr::is_multicast()
for more details.
sourcepub const fn is_unspecified(&self) -> bool
pub const fn is_unspecified(&self) -> bool
Returns true
for the special ‘unspecified’ address.
See IpAddr::is_unspecified()
for more details.
sourceimpl ArchivedIpAddr
impl ArchivedIpAddr
sourcepub const fn is_ipv4(&self) -> bool
pub const fn is_ipv4(&self) -> bool
Returns true
if this address is an IPv4
address, and false
otherwise.
sourcepub const fn is_ipv6(&self) -> bool
pub const fn is_ipv6(&self) -> bool
Returns true
if this address is an IPv6
address, and false
otherwise.
Trait Implementations
sourceimpl Clone for ArchivedIpAddr
impl Clone for ArchivedIpAddr
sourcefn clone(&self) -> ArchivedIpAddr
fn clone(&self) -> ArchivedIpAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ArchivedIpAddr
impl Debug for ArchivedIpAddr
sourceimpl<D: Fallible + ?Sized> Deserialize<IpAddr, D> for ArchivedIpAddr
impl<D: Fallible + ?Sized> Deserialize<IpAddr, D> for ArchivedIpAddr
sourceimpl Hash for ArchivedIpAddr
impl Hash for ArchivedIpAddr
sourceimpl Ord for ArchivedIpAddr
impl Ord for ArchivedIpAddr
sourceimpl PartialEq<ArchivedIpAddr> for IpAddr
impl PartialEq<ArchivedIpAddr> for IpAddr
sourceimpl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
sourcefn eq(&self, other: &ArchivedIpAddr) -> bool
fn eq(&self, other: &ArchivedIpAddr) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ArchivedIpAddr) -> bool
fn ne(&self, other: &ArchivedIpAddr) -> bool
This method tests for !=
.
sourceimpl PartialEq<IpAddr> for ArchivedIpAddr
impl PartialEq<IpAddr> for ArchivedIpAddr
sourceimpl PartialOrd<ArchivedIpAddr> for IpAddr
impl PartialOrd<ArchivedIpAddr> for IpAddr
sourcefn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
sourcefn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<IpAddr> for ArchivedIpAddr
impl PartialOrd<IpAddr> for ArchivedIpAddr
sourcefn partial_cmp(&self, other: &IpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &IpAddr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for ArchivedIpAddr
impl Eq for ArchivedIpAddr
impl StructuralEq for ArchivedIpAddr
impl StructuralPartialEq for ArchivedIpAddr
Auto Trait Implementations
impl RefUnwindSafe for ArchivedIpAddr
impl Send for ArchivedIpAddr
impl Sync for ArchivedIpAddr
impl Unpin for ArchivedIpAddr
impl UnwindSafe for ArchivedIpAddr
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more