[][src]Struct cap_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 std::os::unix::net::UnixListener.

pub 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 try_clone(&self) -> Result<Self>[src]

Creates a new independently owned handle to the underlying socket.

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

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 set_nonblocking(&self, nonblocking: bool) -> Result<()>[src]

Moves the socket into or out of nonblocking mode.

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

pub fn take_error(&self) -> Result<Option<Error>>[src]

Returns the value of the SO_ERROR option.

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

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<'a> IntoIterator for &'a UnixListener[src]

type Item = Result<UnixStream>

The type of the elements being iterated over.

type IntoIter = Incoming<'a>

Which kind of iterator are we turning this into?

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.