[][src]Struct fixed_buffer_tokio::AsyncReadWriteTake

pub struct AsyncReadWriteTake<'a, RW: AsyncRead + AsyncWrite + Send + Unpin> { /* fields omitted */ }

Wraps a struct that implements AsyncRead+AsyncWrite. Passes through reads and writes to the struct. Limits the number of bytes that can be read.

This is like tokio::io::Take that passes through writes. This makes it usable with AsyncRead+AsyncWrite objects like tokio::net::TcpStream and tokio_rustls::server::TlsStream.

Implementations

impl<'a, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncReadWriteTake<'a, RW>[src]

pub fn new(read_writer: &'a mut RW, len: u64) -> AsyncReadWriteTake<'a, RW>[src]

Trait Implementations

impl<'a, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncRead for AsyncReadWriteTake<'a, RW>[src]

impl<'a, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncWrite for AsyncReadWriteTake<'a, RW>[src]

Auto Trait Implementations

impl<'a, RW> RefUnwindSafe for AsyncReadWriteTake<'a, RW> where
    RW: RefUnwindSafe

impl<'a, RW> Send for AsyncReadWriteTake<'a, RW>

impl<'a, RW> Sync for AsyncReadWriteTake<'a, RW> where
    RW: Sync

impl<'a, RW> Unpin for AsyncReadWriteTake<'a, RW>

impl<'a, RW> !UnwindSafe for AsyncReadWriteTake<'a, RW>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.