Enum rkyv::net::ArchivedIpAddr
source · #[repr(u8)]pub enum ArchivedIpAddr {
V4(ArchivedIpv4Addr),
V6(ArchivedIpv6Addr),
}
Expand description
An archived IpAddr
.
Variants§
Implementations§
source§impl 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.
source§impl 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§
source§impl<__C: ?Sized> CheckBytes<__C> for ArchivedIpAddrwhere
ArchivedIpv4Addr: CheckBytes<__C>,
ArchivedIpv6Addr: CheckBytes<__C>,
impl<__C: ?Sized> CheckBytes<__C> for ArchivedIpAddrwhere ArchivedIpv4Addr: CheckBytes<__C>, ArchivedIpv6Addr: CheckBytes<__C>,
§type Error = EnumCheckError<u8>
type Error = EnumCheckError<u8>
The error that may result from checking the type.
source§unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, EnumCheckError<u8>>
unsafe fn check_bytes<'__bytecheck>( value: *const Self, context: &mut __C ) -> Result<&'__bytecheck Self, EnumCheckError<u8>>
Checks whether the given pointer points to a valid value within the
given context. Read more
source§impl Clone for ArchivedIpAddr
impl Clone for ArchivedIpAddr
source§fn clone(&self) -> ArchivedIpAddr
fn clone(&self) -> ArchivedIpAddr
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 ArchivedIpAddr
impl Debug for ArchivedIpAddr
source§impl<D: Fallible + ?Sized> Deserialize<IpAddr, D> for ArchivedIpAddr
impl<D: Fallible + ?Sized> Deserialize<IpAddr, D> for ArchivedIpAddr
source§impl Hash for ArchivedIpAddr
impl Hash for ArchivedIpAddr
source§impl Ord for ArchivedIpAddr
impl Ord for ArchivedIpAddr
source§fn cmp(&self, other: &ArchivedIpAddr) -> Ordering
fn cmp(&self, other: &ArchivedIpAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
source§fn 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 ==
.source§impl PartialEq<ArchivedIpAddr> for IpAddr
impl PartialEq<ArchivedIpAddr> for IpAddr
source§fn 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 ==
.source§impl PartialEq<IpAddr> for ArchivedIpAddr
impl PartialEq<IpAddr> for ArchivedIpAddr
source§impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
source§fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl PartialOrd<ArchivedIpAddr> for IpAddr
impl PartialOrd<ArchivedIpAddr> for IpAddr
source§fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl PartialOrd<IpAddr> for ArchivedIpAddr
impl PartialOrd<IpAddr> for ArchivedIpAddr
1.0.0 · source§fn 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§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn 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.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.