Struct bevy_internal::tasks::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, R2> AsyncBufRead for Chain<R1, R2>where
R1: AsyncBufRead,
R2: AsyncBufRead,
impl<R1, R2> AsyncBufRead for Chain<R1, R2>where
R1: AsyncBufRead,
R2: AsyncBufRead,
source§impl<R1, R2> AsyncRead for Chain<R1, R2>
impl<R1, R2> 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> 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<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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<'a, Self> ⓘwhere
Self: Unpin,
fn read_until<'a>(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>
) -> ReadUntilFuture<'a, Self> ⓘwhere
Self: Unpin,
source§fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'a, 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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.