[−][src]Struct smol_potat::io::Chain
Reader for the AsyncReadExt::chain()
method.
Implementations
impl<T, U> Chain<T, U>
pub fn get_ref(&self) -> (&T, &U)
Gets references to the underlying readers.
Examples
use futures_lite::*; let r1 = io::Cursor::new(b"hello"); let r2 = io::Cursor::new(b"world"); let reader = r1.chain(r2); let (r1, r2) = reader.get_ref();
pub fn get_mut(&mut self) -> (&mut T, &mut U)
Gets mutable references to the underlying readers.
Examples
use futures_lite::*; let r1 = io::Cursor::new(b"hello"); let r2 = io::Cursor::new(b"world"); let mut reader = r1.chain(r2); let (r1, r2) = reader.get_mut();
pub fn into_inner(self) -> (T, U)
Unwraps the adapter, returning the underlying readers.
Examples
use futures_lite::*; let r1 = io::Cursor::new(b"hello"); let r2 = io::Cursor::new(b"world"); let reader = r1.chain(r2); let (r1, r2) = reader.into_inner();
Trait Implementations
impl<T, U> AsyncBufRead for Chain<T, U> where
T: AsyncBufRead,
U: AsyncBufRead,
T: AsyncBufRead,
U: AsyncBufRead,
fn poll_fill_buf(
self: Pin<&mut Chain<T, U>>,
cx: &mut Context
) -> Poll<Result<&[u8], Error>>
self: Pin<&mut Chain<T, U>>,
cx: &mut Context
) -> Poll<Result<&[u8], Error>>
fn consume(self: Pin<&mut Chain<T, U>>, amt: usize)
impl<T, U> AsyncRead for Chain<T, U> where
T: AsyncRead,
U: AsyncRead,
T: AsyncRead,
U: AsyncRead,
fn poll_read(
self: Pin<&mut Chain<T, U>>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
self: Pin<&mut Chain<T, U>>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
fn poll_read_vectored(
self: Pin<&mut Chain<T, U>>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
self: Pin<&mut Chain<T, U>>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
impl<T, U> Debug for Chain<T, U> where
T: Debug,
U: Debug,
T: Debug,
U: Debug,
impl<'__pin, T, U> Unpin for Chain<T, U> where
__Origin<'__pin, T, U>: Unpin,
[src]
__Origin<'__pin, T, U>: Unpin,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Chain<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Chain<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for Chain<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<T, U> UnwindSafe for Chain<T, U> where
T: UnwindSafe,
U: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<R> AsyncBufReadExt for R where
R: AsyncBufRead + ?Sized,
R: AsyncBufRead + ?Sized,
fn read_until(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>
) -> ReadUntilFuture<'a, Self>ⓘImportant traits for ReadUntilFuture<'_, T>
impl<'_, T> Future for ReadUntilFuture<'_, T> where
T: Unpin + AsyncBufRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>
) -> ReadUntilFuture<'a, Self>ⓘ
Important traits for ReadUntilFuture<'_, T>
impl<'_, T> Future for ReadUntilFuture<'_, T> where
T: Unpin + AsyncBufRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn read_line(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'a, Self>ⓘImportant traits for ReadLineFuture<'_, T>
impl<'_, T> Future for ReadLineFuture<'_, T> where
T: Unpin + AsyncBufRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
Important traits for ReadLineFuture<'_, T>
impl<'_, T> Future for ReadLineFuture<'_, T> where
T: Unpin + AsyncBufRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn lines(self) -> Lines<Self> where
Self: Unpin,
Self: Unpin,
fn split(self, byte: u8) -> Split<Self>
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
R: AsyncRead + ?Sized,
fn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>ⓘImportant traits for ReadFuture<'_, T>
impl<'_, T> Future for ReadFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
Important traits for ReadFuture<'_, T>
impl<'_, T> Future for ReadFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self>ⓘImportant traits for ReadVectoredFuture<'_, T>
impl<'_, T> Future for ReadVectoredFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self>ⓘ
Important traits for ReadVectoredFuture<'_, T>
impl<'_, T> Future for ReadVectoredFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEndFuture<'a, Self>ⓘImportant traits for ReadToEndFuture<'_, T>
impl<'_, T> Future for ReadToEndFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
Important traits for ReadToEndFuture<'_, T>
impl<'_, T> Future for ReadToEndFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self>ⓘImportant traits for ReadToStringFuture<'_, T>
impl<'_, T> Future for ReadToStringFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
where
Self: Unpin,
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self>ⓘ
Important traits for ReadToStringFuture<'_, T>
impl<'_, T> Future for ReadToStringFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<usize, Error>;
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self>ⓘImportant traits for ReadExactFuture<'_, T>
impl<'_, T> Future for ReadExactFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<(), Error>;
where
Self: Unpin,
Important traits for ReadExactFuture<'_, T>
impl<'_, T> Future for ReadExactFuture<'_, T> where
T: Unpin + AsyncRead + ?Sized, type Output = Result<(), Error>;
Self: Unpin,
fn take(self, limit: u64) -> Take<Self>
fn bytes(self) -> Bytes<Self>
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
R: AsyncRead,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,