pub enum SocketAddrEx {
Ip(SocketAddr),
Unix(UnixSocketAddr),
}Expand description
Extended socket address supporting IP, Unix, and vsock address families.
Variants§
Implementations§
Source§impl SocketAddrEx
impl SocketAddrEx
Sourcepub fn into_ip(self) -> NetResult<SocketAddr>
pub fn into_ip(self) -> NetResult<SocketAddr>
Convert into an IP socket address, or return an error if not IP.
Sourcepub fn into_unix(self) -> NetResult<UnixSocketAddr>
pub fn into_unix(self) -> NetResult<UnixSocketAddr>
Convert into a Unix socket address, or return an error if not Unix.
Trait Implementations§
Source§impl Clone for SocketAddrEx
impl Clone for SocketAddrEx
Source§fn clone(&self) -> SocketAddrEx
fn clone(&self) -> SocketAddrEx
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SocketAddrEx
impl RefUnwindSafe for SocketAddrEx
impl Send for SocketAddrEx
impl Sync for SocketAddrEx
impl Unpin for SocketAddrEx
impl UnsafeUnpin for SocketAddrEx
impl UnwindSafe for SocketAddrEx
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