pub struct UnsyncReadHalf<T>(/* private fields */);
Expand description
The readable half of a value returned from split
.
Implementations§
Source§impl<T> UnsyncReadHalf<T>
impl<T> UnsyncReadHalf<T>
Sourcepub fn unsplit(self, other: UnsyncWriteHalf<T>) -> T
pub fn unsplit(self, other: UnsyncWriteHalf<T>) -> T
Reunites with a previously split UnsyncWriteHalf
.
§Panics
If this UnsyncReadHalf
and the given UnsyncWriteHalf
do not
originate from the same split_unsync
operation
this method will panic.
Trait Implementations§
Source§impl<T: AsyncRead> AsyncRead for UnsyncReadHalf<T>
impl<T: AsyncRead> AsyncRead for UnsyncReadHalf<T>
Source§impl<T: AsyncReadAt> AsyncReadAt for UnsyncReadHalf<T>
impl<T: AsyncReadAt> AsyncReadAt for UnsyncReadHalf<T>
Source§async fn read_at<B: IoBufMut>(&self, buf: B, pos: u64) -> BufResult<usize, B>
async fn read_at<B: IoBufMut>(&self, buf: B, pos: u64) -> BufResult<usize, B>
Like
AsyncRead::read
, except that it reads at a specified position.Source§async fn read_vectored_at<T: IoVectoredBufMut>(
&self,
buf: T,
pos: u64,
) -> BufResult<usize, T>
async fn read_vectored_at<T: IoVectoredBufMut>( &self, buf: T, pos: u64, ) -> BufResult<usize, T>
Like
AsyncRead::read_vectored
, except that it reads at a specified
position.Auto Trait Implementations§
impl<T> Freeze for UnsyncReadHalf<T>
impl<T> !RefUnwindSafe for UnsyncReadHalf<T>
impl<T> !Send for UnsyncReadHalf<T>
impl<T> !Sync for UnsyncReadHalf<T>
impl<T> Unpin for UnsyncReadHalf<T>
impl<T> !UnwindSafe for UnsyncReadHalf<T>
Blanket Implementations§
Source§impl<A> AsyncReadAtExt for Awhere
A: AsyncReadAt + ?Sized,
impl<A> AsyncReadAtExt for Awhere
A: AsyncReadAt + ?Sized,
Source§async fn read_exact_at<T: IoBufMut>(&self, buf: T, pos: u64) -> BufResult<(), T>
async fn read_exact_at<T: IoBufMut>(&self, buf: T, pos: u64) -> BufResult<(), T>
Read the exact number of bytes required to fill
buffer
. Read moreSource§async fn read_to_string_at(
&mut self,
buf: String,
pos: u64,
) -> BufResult<usize, String>
async fn read_to_string_at( &mut self, buf: String, pos: u64, ) -> BufResult<usize, String>
Read all bytes as
String
until EOF in this source, placing them into
buffer
.Source§async fn read_to_end_at(
&self,
buffer: Vec<u8>,
pos: u64,
) -> BufResult<usize, Vec<u8>>
async fn read_to_end_at( &self, buffer: Vec<u8>, pos: u64, ) -> BufResult<usize, Vec<u8>>
Read all bytes until EOF in this source, placing them into
buffer
. Read moreSource§async fn read_vectored_exact_at<T: IoVectoredBufMut>(
&self,
buf: T,
pos: u64,
) -> BufResult<(), T>
async fn read_vectored_exact_at<T: IoVectoredBufMut>( &self, buf: T, pos: u64, ) -> BufResult<(), T>
Like
AsyncReadExt::read_vectored_exact
, expect that it reads at a
specified position.Source§impl<A> AsyncReadExt for A
impl<A> AsyncReadExt for A
Source§async fn append<T: IoBufMut>(&mut self, buf: T) -> BufResult<usize, T>
async fn append<T: IoBufMut>(&mut self, buf: T) -> BufResult<usize, T>
Same as
AsyncRead::read
, but it appends data to the end of the
buffer; in other words, it read to the beginning of the uninitialized
area.Source§async fn read_exact<T: IoBufMut>(&mut self, buf: T) -> BufResult<(), T>
async fn read_exact<T: IoBufMut>(&mut self, buf: T) -> BufResult<(), T>
Read the exact number of bytes required to fill the buf.
Source§async fn read_to_string(&mut self, buf: String) -> BufResult<usize, String>
async fn read_to_string(&mut self, buf: String) -> BufResult<usize, String>
Read all bytes as
String
until underlying reader reaches EOF
.Source§async fn read_to_end(&mut self, buf: Vec<u8>) -> BufResult<usize, Vec<u8>>
async fn read_to_end(&mut self, buf: Vec<u8>) -> BufResult<usize, Vec<u8>>
Read all bytes until underlying reader reaches
EOF
.Source§async fn read_vectored_exact<T: IoVectoredBufMut>(
&mut self,
buf: T,
) -> BufResult<(), T>
async fn read_vectored_exact<T: IoVectoredBufMut>( &mut self, buf: T, ) -> BufResult<(), T>
Read the exact number of bytes required to fill the vectored buf.
Source§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
Creates an adaptor which reads at most
limit
bytes from it. Read moreSource§async fn read_u8_le(&mut self) -> Result<u8>
async fn read_u8_le(&mut self) -> Result<u8>
Read a little endian
u8
from the underlying reader.Source§async fn read_u16_le(&mut self) -> Result<u16>
async fn read_u16_le(&mut self) -> Result<u16>
Read a little endian
u16
from the underlying reader.Source§async fn read_u32_le(&mut self) -> Result<u32>
async fn read_u32_le(&mut self) -> Result<u32>
Read a little endian
u32
from the underlying reader.Source§async fn read_u64_le(&mut self) -> Result<u64>
async fn read_u64_le(&mut self) -> Result<u64>
Read a little endian
u64
from the underlying reader.Source§async fn read_u128(&mut self) -> Result<u128>
async fn read_u128(&mut self) -> Result<u128>
Read a big endian
u128
from the underlying reader.Source§async fn read_u128_le(&mut self) -> Result<u128>
async fn read_u128_le(&mut self) -> Result<u128>
Read a little endian
u128
from the underlying reader.Source§async fn read_i8_le(&mut self) -> Result<i8>
async fn read_i8_le(&mut self) -> Result<i8>
Read a little endian
i8
from the underlying reader.Source§async fn read_i16_le(&mut self) -> Result<i16>
async fn read_i16_le(&mut self) -> Result<i16>
Read a little endian
i16
from the underlying reader.Source§async fn read_i32_le(&mut self) -> Result<i32>
async fn read_i32_le(&mut self) -> Result<i32>
Read a little endian
i32
from the underlying reader.Source§async fn read_i64_le(&mut self) -> Result<i64>
async fn read_i64_le(&mut self) -> Result<i64>
Read a little endian
i64
from the underlying reader.Source§async fn read_i128(&mut self) -> Result<i128>
async fn read_i128(&mut self) -> Result<i128>
Read a big endian
i128
from the underlying reader.Source§async fn read_i128_le(&mut self) -> Result<i128>
async fn read_i128_le(&mut self) -> Result<i128>
Read a little endian
i128
from the underlying reader.Source§async fn read_f32_le(&mut self) -> Result<f32>
async fn read_f32_le(&mut self) -> Result<f32>
Read a little endian
f32
from the underlying reader.Source§async fn read_f64_le(&mut self) -> Result<f64>
async fn read_f64_le(&mut self) -> Result<f64>
Read a little endian
f64
from the underlying reader.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more