pub struct SockaddrStorage { /* private fields */ }
Implementations§
Source§impl SockaddrStorage
impl SockaddrStorage
Sourcepub unsafe fn as_mut_parts(&mut self) -> (&mut sockaddr, &mut socklen_t)
pub unsafe fn as_mut_parts(&mut self) -> (&mut sockaddr, &mut socklen_t)
Return raw mutable references into the SockaddrStorage
so that a function can be used to
initialize the sockaddr.
§Safety
The referenced length cannot be adjusted to a larger size.
Methods from Deref<Target = Sockaddr>§
pub fn family(&self) -> sa_family_t
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the size, in bytes, of the pointed-to Sockaddr
. This byte count includes the
leading two bytes used to store the address family.
Sourcepub fn as_parts(&self) -> (&sockaddr, socklen_t)
pub fn as_parts(&self) -> (&sockaddr, socklen_t)
Return a reference to the underlying sockaddr
and the length. This is useful for calling
underlying libc functions that take a constant sockaddr. For libc functions that take
mutable sockaddrs, see SockaddrStorage::as_mut_parts
.
pub fn as_sockaddr_un(&self) -> Option<&SockaddrUn>
Trait Implementations§
Source§impl Default for SockaddrStorage
impl Default for SockaddrStorage
Auto Trait Implementations§
impl Freeze for SockaddrStorage
impl RefUnwindSafe for SockaddrStorage
impl Send for SockaddrStorage
impl Sync for SockaddrStorage
impl Unpin for SockaddrStorage
impl UnwindSafe for SockaddrStorage
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