Struct futures_lite::io::Chain
source · 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
__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