Skip to main content

TryReadyExt

Trait TryReadyExt 

Source
pub trait TryReadyExt<T, E, S>
where S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized, Self: TryStream + Sized,
{ // Required methods fn ready_and_then<U, F>( self, f: F, ) -> AndThen<Self, Ready<Result<U, E>>, impl FnMut(S::Ok) -> Ready<Result<U, E>>> where F: Fn(S::Ok) -> Result<U, E>; fn ready_try_filter<F>( self, f: F, ) -> TryFilter<Self, Ready<bool>, impl FnMut(&S::Ok) -> Ready<bool>> where F: Fn(&S::Ok) -> bool; fn ready_try_filter_map<F, U>( self, f: F, ) -> TryFilterMap<Self, Ready<Result<Option<U>, E>>, impl FnMut(S::Ok) -> Ready<Result<Option<U>, E>>> where F: Fn(S::Ok) -> Result<Option<U>, E>; fn ready_try_fold<U, F>( self, init: U, f: F, ) -> TryFold<Self, Ready<Result<U, E>>, U, impl FnMut(U, S::Ok) -> Ready<Result<U, E>>> where F: Fn(U, S::Ok) -> Result<U, E>; fn ready_try_fold_default<U, F>( self, f: F, ) -> TryFold<Self, Ready<Result<U, E>>, U, impl FnMut(U, S::Ok) -> Ready<Result<U, E>>> where F: Fn(U, S::Ok) -> Result<U, E>, U: Default; fn ready_try_for_each<F>( self, f: F, ) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>> where F: FnMut(S::Ok) -> Result<(), E>; fn ready_try_skip_while<F>( self, f: F, ) -> TrySkipWhile<Self, Ready<Result<bool, E>>, impl FnMut(&S::Ok) -> Ready<Result<bool, E>>> where F: Fn(&S::Ok) -> Result<bool, E>; fn ready_try_take_while<F>( self, f: F, ) -> TryTakeWhile<Self, Ready<Result<bool, E>>, impl FnMut(&S::Ok) -> Ready<Result<bool, E>>> where F: Fn(&S::Ok) -> Result<bool, E>; }
Expand description

Synchronous combinators to augment futures::TryStreamExt.

This interface is not necessarily complete; feel free to add as-needed.

Required Methods§

Source

fn ready_and_then<U, F>( self, f: F, ) -> AndThen<Self, Ready<Result<U, E>>, impl FnMut(S::Ok) -> Ready<Result<U, E>>>
where F: Fn(S::Ok) -> Result<U, E>,

Source

fn ready_try_filter<F>( self, f: F, ) -> TryFilter<Self, Ready<bool>, impl FnMut(&S::Ok) -> Ready<bool>>
where F: Fn(&S::Ok) -> bool,

Source

fn ready_try_filter_map<F, U>( self, f: F, ) -> TryFilterMap<Self, Ready<Result<Option<U>, E>>, impl FnMut(S::Ok) -> Ready<Result<Option<U>, E>>>
where F: Fn(S::Ok) -> Result<Option<U>, E>,

Source

fn ready_try_fold<U, F>( self, init: U, f: F, ) -> TryFold<Self, Ready<Result<U, E>>, U, impl FnMut(U, S::Ok) -> Ready<Result<U, E>>>
where F: Fn(U, S::Ok) -> Result<U, E>,

Source

fn ready_try_fold_default<U, F>( self, f: F, ) -> TryFold<Self, Ready<Result<U, E>>, U, impl FnMut(U, S::Ok) -> Ready<Result<U, E>>>
where F: Fn(U, S::Ok) -> Result<U, E>, U: Default,

Source

fn ready_try_for_each<F>( self, f: F, ) -> TryForEach<Self, Ready<Result<(), E>>, impl FnMut(S::Ok) -> Ready<Result<(), E>>>
where F: FnMut(S::Ok) -> Result<(), E>,

Source

fn ready_try_skip_while<F>( self, f: F, ) -> TrySkipWhile<Self, Ready<Result<bool, E>>, impl FnMut(&S::Ok) -> Ready<Result<bool, E>>>
where F: Fn(&S::Ok) -> Result<bool, E>,

Source

fn ready_try_take_while<F>( self, f: F, ) -> TryTakeWhile<Self, Ready<Result<bool, E>>, impl FnMut(&S::Ok) -> Ready<Result<bool, E>>>
where F: Fn(&S::Ok) -> Result<bool, E>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, E, S> TryReadyExt<T, E, S> for S
where S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized, Self: TryStream + Sized,