[][src]Struct cap_async_std::os::unix::net::UnixListener

pub struct UnixListener { /* fields omitted */ }

A structure representing a Unix domain socket server.

This corresponds to std::os::unix::net::UnixListener.

Note that this UnixListener has no bind method. To bind it to a socket address, you must first obtain a Dir containing the path, and then call Dir::bind_unix_listener.

Implementations

impl UnixListener[src]

pub fn from_std(std: UnixListener) -> Self[src]

Constructs a new instance of Self from the given async_std::os::unix::net::UnixListener.

pub async fn accept<'_>(&'_ self) -> Result<(UnixStream, SocketAddr)>[src]

Accepts a new incoming connection to this listener.

This corresponds to std::os::unix::net::UnixListener::accept.

pub fn local_addr(&self) -> Result<SocketAddr>[src]

Returns the local socket address of this listener.

This corresponds to std::os::unix::net::UnixListener::local_addr.

pub fn incoming(&self) -> Incoming[src]

Returns an iterator over incoming connections.

This corresponds to std::os::unix::net::UnixListener::incoming.

Trait Implementations

impl AsRawFd for UnixListener[src]

impl FromRawFd for UnixListener[src]

impl IntoRawFd for UnixListener[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.