pub struct SocketAddr(/* private fields */);Available on Unix and crate feature
net only.Expand description
An address associated with a Tokio Unix socket.
This type is a thin wrapper around std::os::unix::net::SocketAddr. You
can convert to and from the standard library SocketAddr type using the
From trait.
Implementations§
Source§impl SocketAddr
impl SocketAddr
Sourcepub fn is_unnamed(&self) -> bool
Available on non-loom only.
pub fn is_unnamed(&self) -> bool
loom only.Returns true if the address is unnamed.
Documentation reflected in SocketAddr.
Sourcepub fn as_pathname(&self) -> Option<&Path>
Available on non-loom only.
pub fn as_pathname(&self) -> Option<&Path>
loom only.Returns the contents of this address if it is a pathname address.
Documentation reflected in SocketAddr.
Sourcepub fn as_abstract_name(&self) -> Option<&[u8]>
Available on non-loom and (Linux or Android) only.
pub fn as_abstract_name(&self) -> Option<&[u8]>
loom and (Linux or Android) only.Returns the contents of this address if it is in the abstract namespace.
Documentation reflected in SocketAddrExt.
The abstract namespace is a Linux-specific feature.
Trait Implementations§
Source§impl Clone for SocketAddr
Available on non-loom only.
impl Clone for SocketAddr
Available on non-
loom only.Source§fn clone(&self) -> SocketAddr
fn clone(&self) -> SocketAddr
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 SocketAddr
Available on non-loom only.
impl Debug for SocketAddr
Available on non-
loom only.Source§impl From<SocketAddr> for SocketAddr
Available on non-loom only.
impl From<SocketAddr> for SocketAddr
Available on non-
loom only.Source§fn from(value: SocketAddr) -> Self
fn from(value: SocketAddr) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddr> for SocketAddr
Available on non-loom only.
impl From<SocketAddr> for SocketAddr
Available on non-
loom only.Source§fn from(value: SocketAddr) -> Self
fn from(value: SocketAddr) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SocketAddr
Available on non-
loom only.impl RefUnwindSafe for SocketAddr
Available on non-
loom only.impl Send for SocketAddr
Available on non-
loom only.impl Sync for SocketAddr
Available on non-
loom only.impl Unpin for SocketAddr
Available on non-
loom only.impl UnsafeUnpin for SocketAddr
Available on non-
loom only.impl UnwindSafe for SocketAddr
Available on non-
loom only.Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Available on non-loom only.
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Available on non-
loom only.Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
Available on non-loom only.
impl<T> CloneToUninit for Twhere
T: Clone,
Available on non-
loom only.§impl<T> Instrument for T
Available on non-loom only.
impl<T> Instrument for T
Available on non-
loom only.§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> WithSubscriber for T
Available on non-loom only.
impl<T> WithSubscriber for T
Available on non-
loom only.