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 more
sourceimpl 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
sourceimpl PartialEq<ArchivedSocketAddr> for SocketAddr
impl PartialEq<ArchivedSocketAddr> for SocketAddr
sourceimpl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ArchivedSocketAddr) -> bool
fn ne(&self, other: &ArchivedSocketAddr) -> bool
This method tests for !=
.
sourceimpl PartialEq<SocketAddr> for ArchivedSocketAddr
impl PartialEq<SocketAddr> for ArchivedSocketAddr
sourceimpl 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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl 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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl 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 more
impl 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(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more