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]
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]
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.
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut __C
) -> Result<&'a Self, Self::Error>
[src]
value: *const Self,
context: &mut __C
) -> Result<&'a Self, Self::Error>
impl Clone for ArchivedSocketAddr
[src]
impl Clone for ArchivedSocketAddr
[src]fn clone(&self) -> ArchivedSocketAddr
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ArchivedSocketAddr
[src]
impl Copy for ArchivedSocketAddr
[src]impl Eq for ArchivedSocketAddr
[src]
impl Eq for ArchivedSocketAddr
[src]impl Hash for ArchivedSocketAddr
[src]
impl Hash for ArchivedSocketAddr
[src]impl Ord for ArchivedSocketAddr
[src]
impl Ord for ArchivedSocketAddr
[src]impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
[src]
impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
[src]fn eq(&self, other: &ArchivedSocketAddr) -> bool
[src]
fn ne(&self, other: &ArchivedSocketAddr) -> bool
[src]
impl PartialEq<SocketAddr> for ArchivedSocketAddr
[src]
impl PartialEq<SocketAddr> for ArchivedSocketAddr
[src]impl PartialOrd<ArchivedSocketAddr> for ArchivedSocketAddr
[src]
impl PartialOrd<ArchivedSocketAddr> for ArchivedSocketAddr
[src]fn partial_cmp(&self, other: &ArchivedSocketAddr) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl PartialOrd<SocketAddr> for ArchivedSocketAddr
[src]
impl PartialOrd<SocketAddr> for ArchivedSocketAddr
[src]impl StructuralEq for ArchivedSocketAddr
[src]
impl StructuralEq for ArchivedSocketAddr
[src]impl ToSocketAddrs 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
fn to_socket_addrs(&self) -> Result<Self::Iter>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArchivedSocketAddr
impl RefUnwindSafe for ArchivedSocketAddr
impl Send for ArchivedSocketAddr
impl Send for ArchivedSocketAddr
impl Sync for ArchivedSocketAddr
impl Sync for ArchivedSocketAddr
impl Unpin for ArchivedSocketAddr
impl Unpin for ArchivedSocketAddr
impl UnwindSafe for ArchivedSocketAddr
impl UnwindSafe for ArchivedSocketAddr
Blanket Implementations
impl<T> ArchivePointee for T
[src]
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]
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata