Enum rkyv::std_impl::net::ArchivedIpAddr [−][src]
#[repr(u8)] pub enum ArchivedIpAddr { V4(ArchivedIpv4Addr), V6(ArchivedIpv6Addr), }
An archived IpAddr
.
Variants
V4(ArchivedIpv4Addr)
An IPv4 address.
V6(ArchivedIpv6Addr)
An IPv6 address.
Implementations
impl ArchivedIpAddr
[src]
impl ArchivedIpAddr
[src]pub const fn is_ipv4(&self) -> bool
[src]
pub const fn is_ipv4(&self) -> bool
[src]Returns true
if this address is an IPv4
address, and false
otherwise.
pub const fn is_ipv6(&self) -> bool
[src]
pub const fn is_ipv6(&self) -> bool
[src]Returns true
if this address is an IPv6
address, and false
otherwise.
pub const fn is_loopback(&self) -> bool
[src]
pub const fn is_loopback(&self) -> bool
[src]Returns true
if this is a loopback address.
See IpAddr::is_loopback()
for more details.
pub const fn is_multicast(&self) -> bool
[src]
pub const fn is_multicast(&self) -> bool
[src]Returns true
if this is a multicast address.
See IpAddr::is_multicast()
for more details.
pub const fn is_unspecified(&self) -> bool
[src]
pub const fn is_unspecified(&self) -> bool
[src]Returns true
for the special ‘unspecified’ address.
See IpAddr::is_unspecified()
for more details.
Trait Implementations
impl<__C: ?Sized> CheckBytes<__C> for ArchivedIpAddr where
ArchivedIpv4Addr: CheckBytes<__C>,
ArchivedIpv6Addr: CheckBytes<__C>,
[src]
impl<__C: ?Sized> CheckBytes<__C> for ArchivedIpAddr where
ArchivedIpv4Addr: CheckBytes<__C>,
ArchivedIpv6Addr: CheckBytes<__C>,
[src]type Error = EnumCheckError<u8>
type Error = EnumCheckError<u8>
The error that may result from checking the type.
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut __C
) -> Result<&'a Self, Self::Error>
[src]
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut __C
) -> Result<&'a Self, Self::Error>
[src]Checks whether the given pointer points to a valid value within the given context. Read more
impl Clone for ArchivedIpAddr
[src]
impl Clone for ArchivedIpAddr
[src]fn clone(&self) -> ArchivedIpAddr
[src]
fn clone(&self) -> ArchivedIpAddr
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Hash for ArchivedIpAddr
[src]
impl Hash for ArchivedIpAddr
[src]impl Ord for ArchivedIpAddr
[src]
impl Ord for ArchivedIpAddr
[src]impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
[src]
impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
[src]fn eq(&self, other: &ArchivedIpAddr) -> bool
[src]
fn eq(&self, other: &ArchivedIpAddr) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ArchivedIpAddr) -> bool
[src]
fn ne(&self, other: &ArchivedIpAddr) -> bool
[src]This method tests for !=
.
impl PartialEq<IpAddr> for ArchivedIpAddr
[src]
impl PartialEq<IpAddr> for ArchivedIpAddr
[src]impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
[src]
impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr
[src]fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ArchivedIpAddr) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<IpAddr> for ArchivedIpAddr
[src]
impl PartialOrd<IpAddr> for ArchivedIpAddr
[src]fn partial_cmp(&self, other: &IpAddr) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &IpAddr) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for ArchivedIpAddr
[src]
impl Eq for ArchivedIpAddr
[src]
impl StructuralEq for ArchivedIpAddr
[src]
impl StructuralPartialEq for ArchivedIpAddr
[src]
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
impl<T> ArchivePointee for T
[src]
impl<T> ArchivePointee for T
[src]type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]Converts some archived metadata to the pointer metadata for itself.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more