pub struct OwnedWriteHalf(/* private fields */);tokio_support only.Expand description
Owned write half of a UdStream, created by .into_split().
Implementations§
Source§impl OwnedWriteHalf
impl OwnedWriteHalf
Sourcepub fn reunite_with(self, read: OwnedReadHalf) -> Result<UdStream, ReuniteError>
Available on Unix only.
pub fn reunite_with(self, read: OwnedReadHalf) -> Result<UdStream, ReuniteError>
Attempts to put two owned halves of a stream back together and recover the original stream. Succeeds only if the two halves originated from the same call to .into_split().
Sourcepub fn get_peer_credentials(&self) -> Result<ucred>
Available on Unix and (Linux and (GNU or musl or target_env=musleabi or target_env=musleabihf), or Emscripten, or Redox, or Haiku) only.
pub fn get_peer_credentials(&self) -> Result<ucred>
target_env=musleabi or target_env=musleabihf), or Emscripten, or Redox, or Haiku) only.Fetches the credentials of the other end of the connection without using ancillary data. The returned structure contains the process identifier, user identifier and group identifier of the peer.
Sourcepub fn shutdown(&self) -> Result<()>
Available on Unix only.
pub fn shutdown(&self) -> Result<()>
Shuts down the write half.
Attempting to call this method multiple times may return Ok(()) every time or it may return an error the second time it is called, depending on the platform. You must either avoid using the same value twice or ignore the error entirely.
Sourcepub fn into_tokio(self) -> TokioUdStreamOwnedWriteHalf
Available on Unix only.
pub fn into_tokio(self) -> TokioUdStreamOwnedWriteHalf
Unwraps into Tokio’s corresponding type. This is a zero-cost operation.
Sourcepub fn from_tokio(tokio: TokioUdStreamOwnedWriteHalf) -> Self
Available on Unix only.
pub fn from_tokio(tokio: TokioUdStreamOwnedWriteHalf) -> Self
Wraps Tokio’s corresponding type. This is a zero-cost operation.
Trait Implementations§
Source§impl AsyncWrite for OwnedWriteHalf
Available on Unix only.
impl AsyncWrite for OwnedWriteHalf
Source§fn poll_shutdown(
self: Pin<&mut Self>,
_: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut Self>, _: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Finishes immediately. See the .shutdown() method.
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
buf into the object. Read moreSource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Source§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>
poll_write, except that it writes from a slice of buffers. Read moreSource§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
poll_write_vectored
implementation. Read moreSource§impl AsyncWrite for OwnedWriteHalf
Available on Unix only.
impl AsyncWrite for OwnedWriteHalf
Source§fn poll_close(
self: Pin<&mut Self>,
_: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_close( self: Pin<&mut Self>, _: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Finishes immediately. See the .shutdown() method.
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
buf into the object. Read more