[−][src]Trait futures::prelude::TryStream
pub trait TryStream { type Ok; type Error; fn try_poll_next(
self: PinMut<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
The type of successful values yielded by this future
type Error
The type of failures yielded by this future
Required Methods
fn try_poll_next(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Option<Result<Self::Ok, Self::Error>>>
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Option<Result<Self::Ok, Self::Error>>>
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.