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 moresourceimpl 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
sourcefn cmp(&self, other: &ArchivedIpAddr) -> Ordering
fn cmp(&self, other: &ArchivedIpAddr) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
sourcefn eq(&self, other: &ArchivedIpAddr) -> bool
fn eq(&self, other: &ArchivedIpAddr) -> bool
sourceimpl PartialEq<ArchivedIpAddr> for IpAddr
impl PartialEq<ArchivedIpAddr> for IpAddr
sourcefn eq(&self, other: &ArchivedIpAddr) -> bool
fn eq(&self, other: &ArchivedIpAddr) -> bool
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>
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 moresourceimpl 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>
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 moresourceimpl 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>
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 moreimpl 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(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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