Enum rkyv::net::ArchivedSocketAddr
source · #[repr(u8)]pub enum ArchivedSocketAddr {
V4(ArchivedSocketAddrV4),
V6(ArchivedSocketAddrV6),
}
Expand description
An archived SocketAddr
.
Variants§
Implementations§
source§impl ArchivedSocketAddr
impl ArchivedSocketAddr
sourcepub fn as_socket_addr(&self) -> SocketAddr
pub fn as_socket_addr(&self) -> SocketAddr
Returns a SocketAddr
with the same value.
source§impl ArchivedSocketAddr
impl ArchivedSocketAddr
sourcepub fn is_ipv4(&self) -> bool
pub fn is_ipv4(&self) -> bool
Returns true
if the IP address in this ArchivedSocketAddr
is an
IPv4
address, and false
otherwise.
sourcepub fn is_ipv6(&self) -> bool
pub fn is_ipv6(&self) -> bool
Returns true
if the IP address in this ArchivedSocketAddr
is an
IPv6
address, and false
otherwise.
Trait Implementations§
source§impl Clone for ArchivedSocketAddr
impl Clone for ArchivedSocketAddr
source§fn clone(&self) -> ArchivedSocketAddr
fn clone(&self) -> ArchivedSocketAddr
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 ArchivedSocketAddr
impl Debug for ArchivedSocketAddr
source§impl<D: Fallible + ?Sized> Deserialize<SocketAddr, D> for ArchivedSocketAddr
impl<D: Fallible + ?Sized> Deserialize<SocketAddr, D> for ArchivedSocketAddr
source§fn deserialize(&self, deserializer: &mut D) -> Result<SocketAddr, D::Error>
fn deserialize(&self, deserializer: &mut D) -> Result<SocketAddr, D::Error>
Deserializes using the given deserializer
source§impl Hash for ArchivedSocketAddr
impl Hash for ArchivedSocketAddr
source§impl Ord for ArchivedSocketAddr
impl Ord for ArchivedSocketAddr
source§fn cmp(&self, other: &ArchivedSocketAddr) -> Ordering
fn cmp(&self, other: &ArchivedSocketAddr) -> 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<ArchivedSocketAddr> for SocketAddr
impl PartialEq<ArchivedSocketAddr> for SocketAddr
source§fn eq(&self, other: &ArchivedSocketAddr) -> bool
fn eq(&self, other: &ArchivedSocketAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<SocketAddr> for ArchivedSocketAddr
impl PartialEq<SocketAddr> for ArchivedSocketAddr
source§fn eq(&self, other: &SocketAddr) -> bool
fn eq(&self, other: &SocketAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for ArchivedSocketAddr
impl PartialEq for ArchivedSocketAddr
source§fn eq(&self, other: &ArchivedSocketAddr) -> bool
fn eq(&self, other: &ArchivedSocketAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ArchivedSocketAddr> for SocketAddr
impl PartialOrd<ArchivedSocketAddr> for SocketAddr
source§fn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedSocketAddr) -> 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<SocketAddr> for ArchivedSocketAddr
impl PartialOrd<SocketAddr> for ArchivedSocketAddr
source§fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &SocketAddr) -> 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 for ArchivedSocketAddr
impl PartialOrd for ArchivedSocketAddr
source§fn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedSocketAddr) -> 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 ToSocketAddrs for ArchivedSocketAddr
impl ToSocketAddrs for ArchivedSocketAddr
§type Iter = <SocketAddr as ToSocketAddrs>::Iter
type Iter = <SocketAddr as ToSocketAddrs>::Iter
Returned iterator over socket addresses which this type may correspond
to.
source§fn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved
SocketAddr
s. Read moreimpl Copy for ArchivedSocketAddr
impl Eq for ArchivedSocketAddr
impl StructuralPartialEq for ArchivedSocketAddr
Auto Trait Implementations§
impl Freeze for ArchivedSocketAddr
impl RefUnwindSafe for ArchivedSocketAddr
impl Send for ArchivedSocketAddr
impl Sync for ArchivedSocketAddr
impl Unpin for ArchivedSocketAddr
impl UnwindSafe for ArchivedSocketAddr
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