pub struct TcpConnection<'s> { /* private fields */ }
Expand description
Active TCP connection for reading and writing data.
Implements async I/O operations through embedded_io_async
traits.
The connection is automatically closed when dropped.
Trait Implementations§
Source§impl<'s> Debug for TcpConnection<'s>
impl<'s> Debug for TcpConnection<'s>
Source§impl<'s> ErrorType for TcpConnection<'s>
impl<'s> ErrorType for TcpConnection<'s>
Source§impl<'s> Read for TcpConnection<'s>
impl<'s> Read for TcpConnection<'s>
Source§async fn read(
&mut self,
buffer: &mut [u8],
) -> Result<usize, <TcpConnection<'s> as ErrorType>::Error>
async fn read( &mut self, buffer: &mut [u8], ) -> Result<usize, <TcpConnection<'s> as ErrorType>::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
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
. Read moreSource§impl<'s> TcpConnection for TcpConnection<'s>
impl<'s> TcpConnection for TcpConnection<'s>
Source§impl<'s> Write for TcpConnection<'s>
impl<'s> Write for TcpConnection<'s>
Source§async fn write(
&mut self,
buffer: &[u8],
) -> Result<usize, <TcpConnection<'s> as ErrorType>::Error>
async fn write( &mut self, buffer: &[u8], ) -> Result<usize, <TcpConnection<'s> as ErrorType>::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Auto Trait Implementations§
impl<'s> !Freeze for TcpConnection<'s>
impl<'s> RefUnwindSafe for TcpConnection<'s>
impl<'s> Send for TcpConnection<'s>
impl<'s> Sync for TcpConnection<'s>
impl<'s> Unpin for TcpConnection<'s>
impl<'s> !UnwindSafe for TcpConnection<'s>
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