pub use Iterator as Stream;
pub trait TryStream: Stream {
type Ok;
type Error;
fn try_next(&mut self) -> Option<Result<Self::Ok, Self::Error>>;
}
impl<S, T, E> TryStream for S
where
S: ?Sized + Stream<Item = Result<T, E>>,
{
type Ok = T;
type Error = E;
fn try_next(&mut self) -> Option<Result<Self::Ok, Self::Error>> {
self.next()
}
}