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

#[repr(u8)]
pub enum ArchivedSocketAddr {
    V4(ArchivedSocketAddrV4),
    V6(ArchivedSocketAddrV6),
}

An archived SocketAddr.

Variants

An IPv4 socket address.

An IPv6 socket address.

Implementations

impl ArchivedSocketAddr[src]

pub fn as_socket_addr(&self) -> SocketAddr[src]

Returns a SocketAddr with the same value.

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

Returns the IP address associated with this socket address.

pub fn port(&self) -> u16[src]

Returns the port number associated with this socket address.

pub fn is_ipv4(&self) -> bool[src]

Returns true if the IP address in this ArchivedSocketAddr is an IPv4 address, and false otherwise.

pub fn is_ipv6(&self) -> bool[src]

Returns true if the IP address in this ArchivedSocketAddr is an IPv6 address, and false otherwise.

Trait Implementations

impl<__C: ?Sized> CheckBytes<__C> for ArchivedSocketAddr where
    ArchivedSocketAddrV4: CheckBytes<__C>,
    ArchivedSocketAddrV6: CheckBytes<__C>, 
[src]

type Error = EnumCheckError<u8>

The error that may result from checking the type.

impl Clone for ArchivedSocketAddr[src]

impl Copy for ArchivedSocketAddr[src]

impl Eq for ArchivedSocketAddr[src]

impl Hash for ArchivedSocketAddr[src]

impl Ord for ArchivedSocketAddr[src]

impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr[src]

impl PartialEq<SocketAddr> for ArchivedSocketAddr[src]

impl PartialOrd<ArchivedSocketAddr> for ArchivedSocketAddr[src]

impl PartialOrd<SocketAddr> for ArchivedSocketAddr[src]

impl StructuralEq for ArchivedSocketAddr[src]

impl StructuralPartialEq for ArchivedSocketAddr[src]

impl ToSocketAddrs for ArchivedSocketAddr[src]

type Iter = <SocketAddr as ToSocketAddrs>::Iter

Returned iterator over socket addresses which this type may correspond to. Read more

Auto Trait Implementations

Blanket Implementations

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

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

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

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

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

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

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.

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.

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.