pub struct SocketAddrStorage(/* private fields */);
Expand description
struct sockaddr_storage
This type is guaranteed to be large enough to hold any encoded socket address.
Implementations§
Source§impl SocketAddrStorage
impl SocketAddrStorage
Sourcepub fn zeroed() -> Self
pub fn zeroed() -> Self
Return a socket addr storage initialized to all zero bytes. The
sa_family
is set to AddressFamily::UNSPEC
.
Sourcepub fn family(&self) -> AddressFamily
pub fn family(&self) -> AddressFamily
Return the sa_family
of this socket address.
Sourcepub fn clear_family(&mut self)
pub fn clear_family(&mut self)
Clear the sa_family
of this socket address to
AddressFamily::UNSPEC
.
Trait Implementations§
Source§impl Clone for SocketAddrStorage
impl Clone for SocketAddrStorage
Source§fn clone(&self) -> SocketAddrStorage
fn clone(&self) -> SocketAddrStorage
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 moreimpl Copy for SocketAddrStorage
impl Send for SocketAddrStorage
impl Sync for SocketAddrStorage
Auto Trait Implementations§
impl Freeze for SocketAddrStorage
impl RefUnwindSafe for SocketAddrStorage
impl Unpin for SocketAddrStorage
impl UnwindSafe for SocketAddrStorage
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