type SingleStreamResult<St> = Single<Result<<St as TryStream>::Ok, <St as TryStream>::Error>>;

Aliased Type§

struct SingleStreamResult<St>(Option<Result<<St as TryStream>::Ok, <St as TryStream>::Error>>);

Fields§

§0: Option<Result<<St as TryStream>::Ok, <St as TryStream>::Error>>

Implementations§

source§

impl<T> Single<T>

source

fn new(val: T) -> Self

Constructs new Single with the given value.

source

fn next_immediate(&mut self) -> Option<T>

Attempts to take inner item immediately. Will always succeed if the stream isn’t terminated.

Trait Implementations§

source§

impl<T: Clone> Clone for Single<T>

source§

fn clone(&self) -> Single<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Single<T>

source§

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

Formats the value using the given formatter. Read more
source§

impl<T> Stream for Single<T>

§

type Item = T

Values yielded by the stream.
source§

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

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<T> Unpin for Single<T>