Ensures that the given iterator satisfies provided validator for each item. In case of an error, `Err(V::Failure)` will be emitted.
(iter: I, validator: V)
| 35 | /// Ensures that the given iterator satisfies provided validator for each item. |
| 36 | /// In case of an error, `Err(V::Failure)` will be emitted. |
| 37 | pub fn validate<I, V>(iter: I, validator: V) -> impl Iterator<Item = Result<I::Item, V::Failure>> |
| 38 | where |
| 39 | I: IntoIterator, |
| 40 | V: SeqValidator<I::Item>, |
| 41 | { |
| 42 | try_validate(iter.into_iter().map(Ok), validator) |
| 43 | } |
| 44 | |
| 45 | /// Maps supplied iterator and attempts to pair each successfully validated item |
| 46 | /// with a corresponding item from the slice. |
no test coverage detected