pub trait VecFoldResult<'a, T, E>{
// Required method
fn foldr(&self) -> Result<Vec<&T>, &E>;
}
Required Methods§
Implementations on Foreign Types§
Source§impl<'a, T, E> VecFoldResult<'a, T, E> for Vec<Result<T, E>>
Converts Vec<Result<T, E>>
to Result<Vec<&T>, &E>
stopping on first error
impl<'a, T, E> VecFoldResult<'a, T, E> for Vec<Result<T, E>>
Converts Vec<Result<T, E>>
to Result<Vec<&T>, &E>
stopping on first error
If no error is found Vec<&T>
foldr is equivalent of Ok(v.map(|x| x.as_ref().unwrap()))
If an error is found, the first error is returned and the vector is not walked further