Struct mz_ore::netio::socket::UnixSocketAddr
source · pub struct UnixSocketAddr {
path: Option<String>,
}
Available on crate feature
network
only.Expand description
An address associated with a Unix domain socket.
Fields§
§path: Option<String>
Implementations§
source§impl UnixSocketAddr
impl UnixSocketAddr
sourcepub fn from_pathname<S>(path: S) -> Result<UnixSocketAddr, Error>
pub fn from_pathname<S>(path: S) -> Result<UnixSocketAddr, Error>
Constructs a Unix domain socket address from the provided path.
Unlike the UnixSocketAddr::from_pathname
method in the standard
library, path
is required to be valid UTF-8.
§Errors
Returns an error if the path is longer than SUN_LEN
or if it contains
null bytes.
sourcepub fn unnamed() -> UnixSocketAddr
pub fn unnamed() -> UnixSocketAddr
Constructs a Unix domain socket address representing an unnamed Unix socket.
sourcepub fn as_pathname(&self) -> Option<&str>
pub fn as_pathname(&self) -> Option<&str>
Returns the pathname of this Unix domain socket address, if it was constructed from a pathname.
Trait Implementations§
source§impl Clone for UnixSocketAddr
impl Clone for UnixSocketAddr
source§fn clone(&self) -> UnixSocketAddr
fn clone(&self) -> UnixSocketAddr
Returns a copy 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 UnixSocketAddr
impl Debug for UnixSocketAddr
source§impl Display for UnixSocketAddr
impl Display for UnixSocketAddr
source§impl ToSocketAddrs for UnixSocketAddr
impl ToSocketAddrs for UnixSocketAddr
source§fn to_socket_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_socket_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Converts to resolved
SocketAddr
s.Auto Trait Implementations§
impl Freeze for UnixSocketAddr
impl RefUnwindSafe for UnixSocketAddr
impl Send for UnixSocketAddr
impl Sync for UnixSocketAddr
impl Unpin for UnixSocketAddr
impl UnwindSafe for UnixSocketAddr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request