Enum rkyv::std_impl::net::ArchivedIpAddr[][src]

#[repr(u8)]
pub enum ArchivedIpAddr {
    V4(ArchivedIpv4Addr),
    V6(ArchivedIpv6Addr),
}

An archived IpAddr.

Variants

An IPv4 address.

An IPv6 address.

Implementations

impl ArchivedIpAddr[src]

pub const fn as_ipaddr(&self) -> IpAddr[src]

Returns an IpAddr with the same value.

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]

Returns true if this address is an IPv6 address, and false otherwise.

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]

Returns true if this is a multicast address.

See IpAddr::is_multicast() for more details.

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]

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]

Checks whether the given pointer points to a valid value within the given context. Read more

impl Clone for 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]

Performs copy-assignment from source. Read more

impl Hash for ArchivedIpAddr[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for ArchivedIpAddr[src]

fn cmp(&self, other: &ArchivedIpAddr) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr[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]

This method tests for !=.

impl PartialEq<IpAddr> for ArchivedIpAddr[src]

fn eq(&self, other: &IpAddr) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialOrd<ArchivedIpAddr> for ArchivedIpAddr[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]

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]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<IpAddr> for ArchivedIpAddr[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]

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]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater 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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> ArchivePointee for T[src]

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]

Converts some archived metadata to the pointer metadata for itself.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.