pub struct TcpReader<'a> { /* private fields */ }Expand description
The reader half of a TCP socket.
Implementations§
Trait Implementations§
Source§impl<'d> Read for TcpReader<'d>
impl<'d> Read for TcpReader<'d>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Pull some bytes from this source into the specified buffer, returning how many bytes were read.
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf.Auto Trait Implementations§
impl<'a> Freeze for TcpReader<'a>
impl<'a> !RefUnwindSafe for TcpReader<'a>
impl<'a> !Send for TcpReader<'a>
impl<'a> !Sync for TcpReader<'a>
impl<'a> Unpin for TcpReader<'a>
impl<'a> !UnwindSafe for TcpReader<'a>
Blanket Implementations§
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