async_std/stream/double_ended_stream/
next_back.rs1use core::pin::Pin;
2use core::future::Future;
3
4use crate::stream::DoubleEndedStream;
5use crate::task::{Context, Poll};
6
7#[doc(hidden)]
8#[allow(missing_debug_implementations)]
9pub struct NextBackFuture<'a, T: Unpin + ?Sized> {
10 pub(crate) stream: &'a mut T,
11}
12
13impl<T: DoubleEndedStream + Unpin + ?Sized> Future for NextBackFuture<'_, T> {
14 type Output = Option<T::Item>;
15
16 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
17 Pin::new(&mut *self.stream).poll_next_back(cx)
18 }
19}