#[non_exhaustive]pub enum SocketAddress<'a> {
#[non_exhaustive]
IpV4 {
ip: &'a [u8; 4],
port: u16,
},
#[non_exhaustive]
IpV6 {
ip: &'a [u8; 16],
port: u16,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IpV4
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
IpV6
Implementations§
Trait Implementations§
Source§impl<'a> AsVariant for SocketAddress<'a>
impl<'a> AsVariant for SocketAddress<'a>
Source§impl<'a> Clone for SocketAddress<'a>
impl<'a> Clone for SocketAddress<'a>
Source§fn clone(&self) -> SocketAddress<'a>
fn clone(&self) -> SocketAddress<'a>
Returns a duplicate 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<'a> Debug for SocketAddress<'a>
impl<'a> Debug for SocketAddress<'a>
Source§impl<'a> Display for SocketAddress<'a>
impl<'a> Display for SocketAddress<'a>
Source§impl From<&SocketAddress<'_>> for SocketAddr
impl From<&SocketAddress<'_>> for SocketAddr
Source§fn from(address: &SocketAddress<'_>) -> Self
fn from(address: &SocketAddress<'_>) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddress<'_>> for LocalAddress
impl From<SocketAddress<'_>> for LocalAddress
Source§fn from(value: SocketAddress<'_>) -> Self
fn from(value: SocketAddress<'_>) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddress<'_>> for RemoteAddress
impl From<SocketAddress<'_>> for RemoteAddress
Source§fn from(value: SocketAddress<'_>) -> Self
fn from(value: SocketAddress<'_>) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddress<'_>> for SocketAddr
impl From<SocketAddress<'_>> for SocketAddr
Source§fn from(address: SocketAddress<'_>) -> Self
fn from(address: SocketAddress<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddress
impl<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddress
fn into_event(self) -> SocketAddress<'a>
Source§impl<'a> IntoEvent<SocketAddress<'a>> for SocketAddress<'a>
impl<'a> IntoEvent<SocketAddress<'a>> for SocketAddress<'a>
fn into_event(self) -> SocketAddress<'a>
Auto Trait Implementations§
impl<'a> Freeze for SocketAddress<'a>
impl<'a> RefUnwindSafe for SocketAddress<'a>
impl<'a> Send for SocketAddress<'a>
impl<'a> Sync for SocketAddress<'a>
impl<'a> Unpin for SocketAddress<'a>
impl<'a> UnwindSafe for SocketAddress<'a>
Blanket Implementations§
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