pub struct OwnedReadHalf(/* private fields */);tokio_support only.Expand description
Owned read half of a UdStream, created by .into_split().
Implementations§
Source§impl OwnedReadHalf
impl OwnedReadHalf
Sourcepub fn reunite_with(
self,
write: OwnedWriteHalf,
) -> Result<UdStream, ReuniteError>
Available on Unix only.
pub fn reunite_with( self, write: OwnedWriteHalf, ) -> 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 read 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) -> TokioUdStreamOwnedReadHalf
Available on Unix only.
pub fn into_tokio(self) -> TokioUdStreamOwnedReadHalf
Unwraps into Tokio’s corresponding type. This is a zero-cost operation.
Sourcepub fn from_tokio(tokio: TokioUdStreamOwnedReadHalf) -> Self
Available on Unix only.
pub fn from_tokio(tokio: TokioUdStreamOwnedReadHalf) -> Self
Wraps Tokio’s corresponding type. This is a zero-cost operation.
Trait Implementations§
Source§impl AsyncRead for OwnedReadHalf
Available on Unix only.
impl AsyncRead for OwnedReadHalf
Source§impl AsyncRead for OwnedReadHalf
Available on Unix only.
impl AsyncRead for OwnedReadHalf
Source§impl Debug for OwnedReadHalf
Available on Unix only.
impl Debug for OwnedReadHalf
Source§impl From<OwnedReadHalf> for TokioUdStreamOwnedReadHalf
Available on Unix only.
impl From<OwnedReadHalf> for TokioUdStreamOwnedReadHalf
Source§fn from(x: OwnedReadHalf) -> Self
fn from(x: OwnedReadHalf) -> Self
Source§impl From<OwnedReadHalf> for OwnedReadHalf
Available on Unix only.
impl From<OwnedReadHalf> for OwnedReadHalf
Source§fn from(tokio: TokioUdStreamOwnedReadHalf) -> Self
fn from(tokio: TokioUdStreamOwnedReadHalf) -> Self
Auto Trait Implementations§
impl Freeze for OwnedReadHalf
impl RefUnwindSafe for OwnedReadHalf
impl Send for OwnedReadHalf
impl Sync for OwnedReadHalf
impl Unpin for OwnedReadHalf
impl UnwindSafe for OwnedReadHalf
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
Source§fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
buf. Read moreSource§fn read_u8(&mut self) -> ReadU8<&mut Self>where
Self: Unpin,
fn read_u8(&mut self) -> ReadU8<&mut Self>where
Self: Unpin,
Source§fn read_i8(&mut self) -> ReadI8<&mut Self>where
Self: Unpin,
fn read_i8(&mut self) -> ReadI8<&mut Self>where
Self: Unpin,
Source§fn read_u16(&mut self) -> ReadU16<&mut Self>where
Self: Unpin,
fn read_u16(&mut self) -> ReadU16<&mut Self>where
Self: Unpin,
Source§fn read_i16(&mut self) -> ReadI16<&mut Self>where
Self: Unpin,
fn read_i16(&mut self) -> ReadI16<&mut Self>where
Self: Unpin,
Source§fn read_u32(&mut self) -> ReadU32<&mut Self>where
Self: Unpin,
fn read_u32(&mut self) -> ReadU32<&mut Self>where
Self: Unpin,
Source§fn read_i32(&mut self) -> ReadI32<&mut Self>where
Self: Unpin,
fn read_i32(&mut self) -> ReadI32<&mut Self>where
Self: Unpin,
Source§fn read_u64(&mut self) -> ReadU64<&mut Self>where
Self: Unpin,
fn read_u64(&mut self) -> ReadU64<&mut Self>where
Self: Unpin,
Source§fn read_i64(&mut self) -> ReadI64<&mut Self>where
Self: Unpin,
fn read_i64(&mut self) -> ReadI64<&mut Self>where
Self: Unpin,
Source§fn read_u128(&mut self) -> ReadU128<&mut Self>where
Self: Unpin,
fn read_u128(&mut self) -> ReadU128<&mut Self>where
Self: Unpin,
Source§fn read_i128(&mut self) -> ReadI128<&mut Self>where
Self: Unpin,
fn read_i128(&mut self) -> ReadI128<&mut Self>where
Self: Unpin,
Source§fn read_f32(&mut self) -> ReadF32<&mut Self>where
Self: Unpin,
fn read_f32(&mut self) -> ReadF32<&mut Self>where
Self: Unpin,
Source§fn read_f64(&mut self) -> ReadF64<&mut Self>where
Self: Unpin,
fn read_f64(&mut self) -> ReadF64<&mut Self>where
Self: Unpin,
Source§fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>where
Self: Unpin,
fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>where
Self: Unpin,
Source§fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>where
Self: Unpin,
fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>where
Self: Unpin,
Source§fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>where
Self: Unpin,
fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>where
Self: Unpin,
Source§fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>where
Self: Unpin,
fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>where
Self: Unpin,
Source§fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>where
Self: Unpin,
fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>where
Self: Unpin,
Source§fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>where
Self: Unpin,
fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>where
Self: Unpin,
Source§fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>where
Self: Unpin,
fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>where
Self: Unpin,
Source§fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>where
Self: Unpin,
fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>where
Self: Unpin,
Source§fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>where
Self: Unpin,
fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>where
Self: Unpin,
Source§fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>where
Self: Unpin,
fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>where
Self: Unpin,
Source§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
buf. Read more