pub trait TryIgnore<Item>{
// Required methods
fn ignore_err(self) -> impl Stream<Item = Item> + Send;
fn ignore_ok(self) -> impl Stream<Item = Error> + Send;
}Expand description
Selects successful or failed items from a result stream.
Success selection asserts error-free input when debug assertions are enabled and filters errors when they are disabled. Error selection always discards successful items.
Required Methods§
Sourcefn ignore_err(self) -> impl Stream<Item = Item> + Send
fn ignore_err(self) -> impl Stream<Item = Item> + Send
Yields successful values while conditionally ignoring errors.
Errors are filtered when debug assertions are disabled. When they are enabled, each item is expected to be successful so accidental error loss remains visible.
§Panics
Panics when debug assertions are enabled and the source yields an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".