Struct Once

struct Once<Fut> { ... }

A stream which emits single element and then EOF.

Implementations

impl<'__pin, Fut> Unpin for Once<Fut>

impl<Fut> Freeze for Once<Fut>

impl<Fut> RefUnwindSafe for Once<Fut>

impl<Fut> Send for Once<Fut>

impl<Fut> Sync for Once<Fut>

impl<Fut> UnsafeUnpin for Once<Fut>

impl<Fut> UnwindSafe for Once<Fut>

impl<Fut: $crate::fmt::Debug> Debug for Once<Fut>

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

impl<Fut: Future> FusedStream for Once<Fut>

fn is_terminated(self: &Self) -> bool

impl<Fut: Future> Stream for Once<Fut>

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<<Self as >::Item>>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<S> TryStreamExt for Once<Fut>

impl<S, T, E> TryStream for Once<Fut>

fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

impl<T> Any for Once<Fut>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Once<Fut>

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

impl<T> BorrowMut for Once<Fut>

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

impl<T> From for Once<Fut>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> StreamExt for Once<Fut>

impl<T, U> Into for Once<Fut>

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 Once<Fut>

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

impl<T, U> TryInto for Once<Fut>

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