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
pub fn is_unnamed(&self) -> bool
Returns true
if the address is unnamed.
Documentation reflected in SocketAddr
Sourcepub fn as_pathname(&self) -> Option<&Path>
pub fn as_pathname(&self) -> Option<&Path>
Returns the contents of this address if it is a pathname
address.
Documentation reflected in SocketAddr
Trait Implementations§
Source§impl Debug for SocketAddr
impl Debug for SocketAddr
Source§impl From<SocketAddr> for SocketAddr
impl From<SocketAddr> for SocketAddr
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
impl From<SocketAddr> for SocketAddr
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
impl RefUnwindSafe for SocketAddr
impl Send for SocketAddr
impl Sync for SocketAddr
impl Unpin for SocketAddr
impl UnwindSafe for SocketAddr
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 116 bytes