Basically, I'm looking for the partitionEithers equivalent in Rust, i.e. to convert Vec<Result<A, B>> into Result<Vec<A>, Vec<B>>.
I know I can transform a Vec<Result<A, B>> into Result<Vec<A>, B> by using collect::<Result<Vec<A>, B>>, but when I try collect::<Result<Vec<A>, Vec<B>>>, I'll get an error saying such implementation is missing.
Also I know this can be done using mutations, but I'm wondering if there are any immutable alternatives that I can look into?