[−][src]Struct cap_std::os::unix::net::UnixListener
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]
unsafe fn from_raw_fd(fd: RawFd) -> Self[src]
impl<'a> IntoIterator for &'a UnixListener[src]
type IntoIter = Incoming<'a>
Which kind of iterator are we turning this into?
type Item = Result<UnixStream>
The type of the elements being iterated over.
fn into_iter(self) -> Incoming<'a>ⓘ[src]
impl IntoRawFd for UnixListener[src]
fn into_raw_fd(self) -> RawFd[src]
Auto Trait Implementations
impl RefUnwindSafe for UnixListener
impl Send for UnixListener
impl Sync for UnixListener
impl Unpin for UnixListener
impl UnwindSafe for UnixListener
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,