fallible_position

Function fallible_position 

Source
pub fn fallible_position<T, E>(
    iter: impl IntoIterator<Item = T>,
    predicate: impl FnMut(T) -> Result<bool, E>,
) -> Result<Option<usize>, E>
Expand description

Returns Ok(Some(index)) for the first element where the predicate returns Ok(true), Ok(None) if no element satisfies it, or Err on the first error.