Struct SocketAddr
pub struct SocketAddr(/* private fields */);
Available on Unix and crate feature
net only.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
impl SocketAddr
pub fn is_unnamed(&self) -> bool
Returns true if the address is unnamed.
Documentation reflected in SocketAddr.
pub fn as_pathname(&self) -> Option<&Path>
Returns the contents of this address if it is a pathname address.
Documentation reflected in SocketAddr.
pub fn as_abstract_name(&self) -> Option<&[u8]>
Available on Android or Linux 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
impl Clone for SocketAddr
fn clone(&self) -> SocketAddr
Returns a duplicate of the value. Read more
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more
impl Debug for SocketAddr
impl From<SocketAddr> for SocketAddr
fn from(value: SocketAddr) -> Self
Converts to this type from the input type.
impl From<SocketAddr> for SocketAddr
fn from(value: SocketAddr) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl Freeze for SocketAddr
impl RefUnwindSafe for SocketAddr
impl Send for SocketAddr
impl Sync for SocketAddr
impl Unpin for SocketAddr
impl UnsafeUnpin for SocketAddr
impl UnwindSafe for SocketAddr
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CloneToUninit for Twhere T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/net/unix/struct.SocketAddr.html