Trait futures_util::try_stream::TryStream[][src]

pub trait TryStream: Stream + Sealed {
    type Ok;
    type Error;
    pub fn try_poll_next(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Option<Result<Self::Ok, Self::Error>>>; }

A convenience for streams that return Result values that includes a variety of adapters tailored to such futures.

Associated Types

type Ok[src]

The type of successful values yielded by this future

type Error[src]

The type of failures yielded by this future

Loading content...

Required methods

pub fn try_poll_next(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Ok, Self::Error>>>
[src]

Poll this TryStream as if it were a Stream.

This method is a stopgap for a compiler limitation that prevents us from directly inheriting from the Stream trait; in the future it won’t be needed.

Loading content...

Implementors

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

type Error = E

Loading content...