pub struct Chain<R1, R2> { /* private fields */ }
Expand description
Reader for the AsyncReadExt::chain()
method.
Implementations§
Source§impl<R1, R2> Chain<R1, R2>
impl<R1, R2> Chain<R1, R2>
Sourcepub fn get_ref(&self) -> (&R1, &R2)
pub fn get_ref(&self) -> (&R1, &R2)
Gets references to the underlying readers.
§Examples
use futures_lite::io::{AsyncReadExt, Cursor};
let r1 = Cursor::new(b"hello");
let r2 = Cursor::new(b"world");
let reader = r1.chain(r2);
let (r1, r2) = reader.get_ref();
Sourcepub fn get_mut(&mut self) -> (&mut R1, &mut R2)
pub fn get_mut(&mut self) -> (&mut R1, &mut R2)
Gets mutable references to the underlying readers.
§Examples
use futures_lite::io::{AsyncReadExt, Cursor};
let r1 = Cursor::new(b"hello");
let r2 = Cursor::new(b"world");
let mut reader = r1.chain(r2);
let (r1, r2) = reader.get_mut();
Sourcepub fn into_inner(self) -> (R1, R2)
pub fn into_inner(self) -> (R1, R2)
Unwraps the adapter, returning the underlying readers.
§Examples
use futures_lite::io::{AsyncReadExt, Cursor};
let r1 = Cursor::new(b"hello");
let r2 = Cursor::new(b"world");
let reader = r1.chain(r2);
let (r1, r2) = reader.into_inner();
Trait Implementations§
Source§impl<R1: AsyncBufRead, R2: AsyncBufRead> AsyncBufRead for Chain<R1, R2>
impl<R1: AsyncBufRead, R2: AsyncBufRead> AsyncBufRead for Chain<R1, R2>
Source§impl<R1: AsyncRead, R2: AsyncRead> AsyncRead for Chain<R1, R2>
impl<R1: AsyncRead, R2: AsyncRead> AsyncRead for Chain<R1, R2>
impl<'__pin, R1, R2> Unpin for Chain<R1, R2>where
PinnedFieldsOf<__Origin<'__pin, R1, R2>>: Unpin,
Auto Trait Implementations§
impl<R1, R2> Freeze for Chain<R1, R2>
impl<R1, R2> RefUnwindSafe for Chain<R1, R2>where
R1: RefUnwindSafe,
R2: RefUnwindSafe,
impl<R1, R2> Send for Chain<R1, R2>
impl<R1, R2> Sync for Chain<R1, R2>
impl<R1, R2> UnwindSafe for Chain<R1, R2>where
R1: UnwindSafe,
R2: UnwindSafe,
Blanket Implementations§
Source§impl<R> AsyncBufReadExt for Rwhere
R: AsyncBufRead + ?Sized,
impl<R> AsyncBufReadExt for Rwhere
R: AsyncBufRead + ?Sized,
Source§fn fill_buf(&mut self) -> FillBuf<'_, Self> ⓘwhere
Self: Unpin,
fn fill_buf(&mut self) -> FillBuf<'_, Self> ⓘwhere
Self: Unpin,
Returns the contents of the internal buffer, filling it with more data if empty. Read more
Source§fn read_until<'a>(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>,
) -> ReadUntilFuture<'_, Self> ⓘwhere
Self: Unpin,
fn read_until<'a>(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>,
) -> ReadUntilFuture<'_, Self> ⓘwhere
Self: Unpin,
Source§fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'_, Self> ⓘwhere
Self: Unpin,
fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'_, Self> ⓘwhere
Self: Unpin,
Reads all bytes and appends them into
buf
until a newline (the 0xA byte) or EOF is found. Read moreSource§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> ⓘwhere
Self: Unpin,
Reads some bytes from the byte stream. Read more
Source§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> ⓘwhere
Self: Unpin,
Reads the exact number of bytes required to fill
buf
. Read moreSource§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
Creates an adapter which will read at most
limit
bytes from it. Read moreSource§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