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

pub struct UnixStream { /* fields omitted */ }

A Unix stream socket.

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

Note that this UnixStream has no connect method. To create a UnixStream, you must first obtain a Dir containing the path, and then call Dir::connect_unix_stream.

Implementations

impl UnixStream[src]

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

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

pub fn pair() -> Result<(Self, Self)>[src]

Creates an unnamed pair of connected sockets.

This corresponds to std::os::unix::net::UnixStream::pair.

TODO: should this require a capability?

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

Returns the socket address of the local half of this connection.

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

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

Returns the socket address of the remote half of this connection.

This corresponds to std::os::unix::net::UnixStream::peer_addr.

pub fn shutdown(&self, how: Shutdown) -> Result<()>[src]

Shuts down the read, write, or both halves of this connection.

This corresponds to std::os::unix::net::UnixStream::shutdown.

Trait Implementations

impl AsRawFd for UnixStream[src]

impl AsyncRead for UnixStream[src]

impl AsyncWrite for UnixStream[src]

impl FromRawFd for UnixStream[src]

impl IntoRawFd for UnixStream[src]

Auto Trait Implementations

Blanket Implementations

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

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?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> ReadExt for T where
    T: AsyncRead + ?Sized
[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.

impl<T> WriteExt for T where
    T: AsyncWrite + ?Sized
[src]