/// Tries to convert a series of `T`s to `U`s, returning an error at the first failure
Tries to convert a series of `T`s to `U`s, returning an error at the first failure
Tries to convert a series of ` T ` s to ` U ` s returning an error at the first failure
pub fn try_convert_all<T, U, I>(into_iter: I) -> Result<Vec<U>, T::Error>
where
    I: IntoIterator<Item = T>,
    T: TryInto<U>,
{
    let iter = into_iter.into_iter();
    let mut result = Vec::with_capacity(iter.size_hint().0);
    for item in iter {
        result.push(item.try_into()?);
    }
    Ok(result)
}
pub fn try_convert_all < T , U , I > ( into_iter : I ) -> Result < Vec < U > , T :: Error > where I : IntoIterator < Item = T > , T : TryInto < U > , { let iter = into_iter . into_iter ( ) ; let mut result = Vec :: with_capacity ( iter . size_hint ( ) . 0 ) ; for item in iter { result . push ( item . try_into ( ) ? ) ; } Ok ( result ) }
Tries to convert a series of `T`s to `U`s, returning an error at the first failure
Tries to convert a series of ` T ` s to ` U ` s returning an error at the first failure
into_iter
I