#[non_exhaustive]pub enum SocketAddress<'a> {
IpV4 {
ip: &'a [u8; 4],
port: u16,
},
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> Clone for SocketAddress<'a>
impl<'a> Clone for SocketAddress<'a>
source§fn clone(&self) -> SocketAddress<'a>
fn clone(&self) -> SocketAddress<'a>
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<'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<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddress
impl<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddress
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