pub struct SocketAddrUnix { /* private fields */ }Available on crate feature
net and Unix only.Expand description
struct sockaddr_un
Implementations§
Source§impl SocketAddrUnix
impl SocketAddrUnix
Sourcepub fn new<P: Arg>(path: P) -> Result<Self>
Available on non-WASI only.
pub fn new<P: Arg>(path: P) -> Result<Self>
Construct a new Unix-domain address from a filesystem path.
Sourcepub fn path(&self) -> Option<Cow<'_, CStr>>
Available on crate feature alloc only.
pub fn path(&self) -> Option<Cow<'_, CStr>>
alloc only.For a filesystem path address, return the path.
Sourcepub fn path_bytes(&self) -> Option<&[u8]>
Available on non-WASI only.
pub fn path_bytes(&self) -> Option<&[u8]>
For a filesystem path address, return the path as a byte sequence, excluding the NUL terminator.
Trait Implementations§
Source§impl Clone for SocketAddrUnix
Available on non-WASI only.
impl Clone for SocketAddrUnix
Available on non-WASI only.
Source§fn clone(&self) -> SocketAddrUnix
fn clone(&self) -> SocketAddrUnix
Returns a duplicate 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 Debug for SocketAddrUnix
Available on non-WASI only.
impl Debug for SocketAddrUnix
Available on non-WASI only.
Source§impl From<SocketAddrUnix> for SocketAddrAny
impl From<SocketAddrUnix> for SocketAddrAny
Source§fn from(from: SocketAddrUnix) -> Self
fn from(from: SocketAddrUnix) -> Self
Converts to this type from the input type.
Source§impl Hash for SocketAddrUnix
Available on non-WASI only.
impl Hash for SocketAddrUnix
Available on non-WASI only.
Source§impl Ord for SocketAddrUnix
Available on non-WASI only.
impl Ord for SocketAddrUnix
Available on non-WASI only.
Source§impl PartialEq for SocketAddrUnix
Available on non-WASI only.
impl PartialEq for SocketAddrUnix
Available on non-WASI only.
Source§impl PartialOrd for SocketAddrUnix
Available on non-WASI only.
impl PartialOrd for SocketAddrUnix
Available on non-WASI only.
Source§impl SocketAddrArg for SocketAddrUnix
impl SocketAddrArg for SocketAddrUnix
Source§unsafe fn with_sockaddr<R>(
&self,
f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R,
) -> R
unsafe fn with_sockaddr<R>( &self, f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, ) -> R
Call a closure with the pointer and length to the corresponding C type. Read more
Source§fn as_any(&self) -> SocketAddrAny
fn as_any(&self) -> SocketAddrAny
Convert to
SocketAddrAny.Source§unsafe fn write_sockaddr(
&self,
storage: *mut SocketAddrStorage,
) -> SocketAddrLen
unsafe fn write_sockaddr( &self, storage: *mut SocketAddrStorage, ) -> SocketAddrLen
Encode an address into a
SocketAddrStorage. Read moreSource§impl TryFrom<SocketAddrAny> for SocketAddrUnix
impl TryFrom<SocketAddrAny> for SocketAddrUnix
impl Eq for SocketAddrUnix
Available on non-WASI only.
Auto Trait Implementations§
impl Freeze for SocketAddrUnix
impl RefUnwindSafe for SocketAddrUnix
impl Send for SocketAddrUnix
impl Sync for SocketAddrUnix
impl Unpin for SocketAddrUnix
impl UnwindSafe for SocketAddrUnix
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