Struct cap_async_std::os::unix::net::UnixStream [−][src]
A Unix stream socket.
This corresponds to async_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 unsafe fn from_std(std: UnixStream) -> Self
[src][−]
Constructs a new instance of Self
from the given async_std::os::unix::net::UnixStream
.
Safety
async_std::os::unix::net::UnixStream
is not sandboxed and may access any address that
the host process has access to.
pub fn pair() -> Result<(Self, Self)>
[src][−]
Creates an unnamed pair of connected sockets.
This corresponds to async_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 async_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 async_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 async_std::os::unix::net::UnixStream::shutdown
.
Trait Implementations
impl AsRawFd for UnixStream
[src][+]
impl AsyncRead for UnixStream
[src][+]
impl AsyncRead for &UnixStream
[src][+]
impl AsyncWrite for UnixStream
[src][+]
impl AsyncWrite for &UnixStream
[src][+]
impl FromRawFd for UnixStream
[src][+]
impl IntoRawFd for UnixStream
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for UnixStream
[src]
impl Send for UnixStream
[src]
impl Sync for UnixStream
[src]
impl Unpin for UnixStream
[src]
impl UnwindSafe for UnixStream
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> AsUnsafeFile for T where
T: AsRawFd,
[src][+]
T: AsRawFd,
impl<T> AsUnsafeHandle for T where
T: AsRawFd,
[src][+]
T: AsRawFd,
impl<T> AsUnsafeSocket for T where
T: AsRawFd,
[src][+]
T: AsRawFd,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
[+]
R: AsyncRead + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
[+]
W: AsyncWrite + ?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,
impl<T> From<T> for T
[src][+]
impl<T> FromUnsafeFile for T where
T: FromRawFd,
[src][+]
T: FromRawFd,
impl<T> FromUnsafeSocket for T where
T: FromRawFd,
[src][+]
T: FromRawFd,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoUnsafeFile for T where
T: IntoRawFd,
[src][+]
T: IntoRawFd,
impl<T> IntoUnsafeHandle for T where
T: IntoRawFd,
[src][+]
T: IntoRawFd,
impl<T> IntoUnsafeSocket for T where
T: IntoRawFd,
[src][+]
T: IntoRawFd,
impl<T> ReadExt for T where
T: AsyncRead + ?Sized,
[src][+]
T: AsyncRead + ?Sized,
impl<T> SetTimes for T where
T: AsRawFd,
[+]
T: AsRawFd,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> WriteExt for T where
T: AsyncWrite + ?Sized,
[src][+]
T: AsyncWrite + ?Sized,