Enum rkyv::net::ArchivedSocketAddr
source · [−]#[repr(u8)]
pub enum ArchivedSocketAddr {
V4(ArchivedSocketAddrV4),
V6(ArchivedSocketAddrV6),
}
Expand description
An archived SocketAddr
.
Variants
V4(ArchivedSocketAddrV4)
An IPv4 socket address.
V6(ArchivedSocketAddrV6)
An IPv6 socket address.
Implementations
sourceimpl ArchivedSocketAddr
impl ArchivedSocketAddr
sourcepub fn as_socket_addr(&self) -> SocketAddr
pub fn as_socket_addr(&self) -> SocketAddr
Returns a SocketAddr
with the same value.
sourceimpl 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
sourceimpl Clone for ArchivedSocketAddr
impl Clone for ArchivedSocketAddr
sourcefn clone(&self) -> ArchivedSocketAddr
fn clone(&self) -> ArchivedSocketAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ArchivedSocketAddr
impl Debug for ArchivedSocketAddr
sourceimpl<D: Fallible + ?Sized> Deserialize<SocketAddr, D> for ArchivedSocketAddr
impl<D: Fallible + ?Sized> Deserialize<SocketAddr, D> for ArchivedSocketAddr
sourcefn deserialize(&self, deserializer: &mut D) -> Result<SocketAddr, D::Error>
fn deserialize(&self, deserializer: &mut D) -> Result<SocketAddr, D::Error>
Deserializes using the given deserializer
sourceimpl Hash for ArchivedSocketAddr
impl Hash for ArchivedSocketAddr
sourceimpl Ord for ArchivedSocketAddr
impl Ord for ArchivedSocketAddr
sourcefn cmp(&self, other: &ArchivedSocketAddr) -> Ordering
fn cmp(&self, other: &ArchivedSocketAddr) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
sourcefn eq(&self, other: &ArchivedSocketAddr) -> bool
fn eq(&self, other: &ArchivedSocketAddr) -> bool
sourceimpl PartialEq<ArchivedSocketAddr> for SocketAddr
impl PartialEq<ArchivedSocketAddr> for SocketAddr
sourcefn eq(&self, other: &ArchivedSocketAddr) -> bool
fn eq(&self, other: &ArchivedSocketAddr) -> bool
sourceimpl PartialEq<SocketAddr> for ArchivedSocketAddr
impl PartialEq<SocketAddr> for ArchivedSocketAddr
sourcefn eq(&self, other: &SocketAddr) -> bool
fn eq(&self, other: &SocketAddr) -> bool
sourceimpl PartialOrd<ArchivedSocketAddr> for ArchivedSocketAddr
impl PartialOrd<ArchivedSocketAddr> for ArchivedSocketAddr
sourcefn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl PartialOrd<ArchivedSocketAddr> for SocketAddr
impl PartialOrd<ArchivedSocketAddr> for SocketAddr
sourcefn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl PartialOrd<SocketAddr> for ArchivedSocketAddr
impl PartialOrd<SocketAddr> for ArchivedSocketAddr
sourcefn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl 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. Read more
sourcefn 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 StructuralEq for ArchivedSocketAddr
impl StructuralPartialEq for ArchivedSocketAddr
Auto Trait Implementations
impl RefUnwindSafe for ArchivedSocketAddr
impl Send for ArchivedSocketAddr
impl Sync for ArchivedSocketAddr
impl Unpin for ArchivedSocketAddr
impl UnwindSafe for ArchivedSocketAddr
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn 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.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more