pub trait TryTools<T, E, S>{
// Required method
fn try_take(
self,
n: usize,
) -> TryTakeWhile<Self, Ready<Result<bool, S::Error>>, impl FnMut(&S::Ok) -> Ready<Result<bool, S::Error>>>;
}Expand description
Adds general-purpose operations to fallible streams.
The adapters preserve the source error type and successful item order. They operate lazily without collecting the stream.
Required Methods§
Sourcefn try_take(
self,
n: usize,
) -> TryTakeWhile<Self, Ready<Result<bool, S::Error>>, impl FnMut(&S::Ok) -> Ready<Result<bool, S::Error>>>
fn try_take( self, n: usize, ) -> TryTakeWhile<Self, Ready<Result<bool, S::Error>>, impl FnMut(&S::Ok) -> Ready<Result<bool, S::Error>>>
Limits the stream to at most n successful items.
After yielding n successes, the adapter consumes one additional
success to detect the limit. Earlier source errors are still forwarded;
with zero, they precede consumption of the first unyielded success.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".