Struct rmp_futures::decode::ArrayFuture
source · [−]pub struct ArrayFuture<R> { /* private fields */ }Implementations
sourceimpl<R: AsyncRead + Unpin> ArrayFuture<R>
impl<R: AsyncRead + Unpin> ArrayFuture<R>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn next(self) -> MsgPackOption<MsgPackFuture<Self>, R>
pub fn next_dyn(
&mut self
) -> Option<MsgPackFuture<&mut (dyn AsyncRead + Unpin + Send)>>where
R: Send,
sourcepub fn last(self) -> MsgPackOption<MsgPackFuture<R>, R>
pub fn last(self) -> MsgPackOption<MsgPackFuture<R>, R>
If this is the last element, return a future of it’s value wrapped around the
underlying reader. Avoids having to call next() a final time.
sourcepub async fn skip(self) -> IoResult<R>where
R: Send,
pub async fn skip(self) -> IoResult<R>where
R: Send,
Consume all remaining elements and return the underlying reader
pub async fn into_value_vec(self) -> IoResult<(Vec<Value>, R)>where
R: Send,
pub fn into_value(self) -> impl Future<Output = IoResult<(Value, R)>>where
R: Send,
Trait Implementations
sourceimpl<R: AsyncRead + Unpin> AsyncRead for ArrayFuture<R>
impl<R: AsyncRead + Unpin> AsyncRead for ArrayFuture<R>
sourcefn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<IoResult<usize>>
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<IoResult<usize>>
Attempt to read from the AsyncRead into buf. Read more
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
Attempt to read from the AsyncRead into bufs using vectored
IO operations. Read more
Auto Trait Implementations
impl<R> RefUnwindSafe for ArrayFuture<R>where
R: RefUnwindSafe,
impl<R> Send for ArrayFuture<R>where
R: Send,
impl<R> Sync for ArrayFuture<R>where
R: Sync,
impl<R> Unpin for ArrayFuture<R>where
R: Unpin,
impl<R> UnwindSafe for ArrayFuture<R>where
R: UnwindSafe,
Blanket Implementations
impl<R> AsyncReadExt for Rwhere
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for Rwhere
R: AsyncRead + ?Sized,
fn chain<R>(self, next: R) -> Chain<Self, R>where
R: AsyncRead,
fn chain<R>(self, next: R) -> Chain<Self, R>where
R: AsyncRead,
Creates an adaptor which will chain this stream with another. Read more
fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
Tries to read some bytes directly into the given buf in asynchronous
manner, returning a future type. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self>where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self>where
Self: Unpin,
Creates a future which will read from the AsyncRead into bufs using vectored
IO operations. Read more
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
Creates a future which will read exactly enough bytes to fill buf,
returning an error if end of file (EOF) is hit sooner. Read more
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8, Global>) -> ReadToEnd<'a, Self>where
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8, Global>) -> ReadToEnd<'a, Self>where
Self: Unpin,
Creates a future which will read all the bytes from this AsyncRead. Read more
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self>where
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self>where
Self: Unpin,
Creates a future which will read all the bytes from this AsyncRead. Read more
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more