MapRetry

Trait MapRetry 

Source
pub trait MapRetry: Iterator + Sized {
    // Required method
    fn map_retry<F>(self, f: F) -> MapIter<Self, F> ;
}
Expand description

Trait defining retry signatures

Required Methods§

Source

fn map_retry<F>(self, f: F) -> MapIter<Self, F>

Works the same as map function, but retries failures. Return type of provided closure must of type Result if result is error iterator retries to apply function agian.

Order of elements is not guaranteed. All elements in original iterator are returned.

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: Iterator> MapRetry for T