Struct StreamFuture

struct StreamFuture<St> { ... }

Future for the into_future method.

Implementations

impl<St: Stream + Unpin> StreamFuture<St>

fn get_ref(self: &Self) -> Option<&St>

Acquires a reference to the underlying stream that this combinator is pulling from.

This method returns an Option to account for the fact that StreamFuture's implementation of Future::poll consumes the underlying stream during polling in order to return it to the caller of Future::poll if the stream yielded an element.

fn get_mut(self: &mut Self) -> Option<&mut St>

Acquires a mutable reference to the underlying stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.

This method returns an Option to account for the fact that StreamFuture's implementation of Future::poll consumes the underlying stream during polling in order to return it to the caller of Future::poll if the stream yielded an element.

fn get_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut St>>

Acquires a pinned mutable reference to the underlying stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.

This method returns an Option to account for the fact that StreamFuture's implementation of Future::poll consumes the underlying stream during polling in order to return it to the caller of Future::poll if the stream yielded an element.

fn into_inner(self: Self) -> Option<St>

Consumes this combinator, returning the underlying stream.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

This method returns an Option to account for the fact that StreamFuture's implementation of Future::poll consumes the underlying stream during polling in order to return it to the caller of Future::poll if the stream yielded an element.

impl<F> IntoFuture for StreamFuture<St>

fn into_future(self: Self) -> <F as IntoFuture>::IntoFuture

impl<St> Freeze for StreamFuture<St>

impl<St> RefUnwindSafe for StreamFuture<St>

impl<St> Send for StreamFuture<St>

impl<St> Sync for StreamFuture<St>

impl<St> Unpin for StreamFuture<St>

impl<St> UnsafeUnpin for StreamFuture<St>

impl<St> UnwindSafe for StreamFuture<St>

impl<St: $crate::fmt::Debug> Debug for StreamFuture<St>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<St: Stream + Unpin> FusedFuture for StreamFuture<St>

fn is_terminated(self: &Self) -> bool

impl<St: Stream + Unpin> Future for StreamFuture<St>

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<<Self as >::Output>

impl<T> Any for StreamFuture<St>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for StreamFuture<St>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for StreamFuture<St>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for StreamFuture<St>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for StreamFuture<St>

impl<T, U> Into for StreamFuture<St>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for StreamFuture<St>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for StreamFuture<St>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>