Struct linux_unsafe::sockaddr
source · #[repr(C)]pub struct sockaddr {
pub family: sa_family_t,
/* private fields */
}Expand description
The type used for representing socket addresses in the raw system calls.
This is a type of unknown length, because the actual length of a socket
address depends on the address family. When reading a socket address of
an unknown address family, use a pointer to a sockaddr_storage as a
placeholder type and then convert based on the returned family.
Warning: It is not meaningful to ask the compiler for the size of
this type; it will return an arbitrary placeholder value. If you need
sufficient storage for an arbitrary address, use sockaddr_storage
instead.
Fields§
§family: sa_family_tAuto Trait Implementations§
impl Freeze for sockaddr
impl RefUnwindSafe for sockaddr
impl Send for sockaddr
impl Sync for sockaddr
impl Unpin for sockaddr
impl UnwindSafe for sockaddr
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