.map(|result| result .map(/* your Ok value logic */))
.take_until(|result| result .is_err()
.fold(|result| { let aggregate = result?/* rest of the fold logic here */ })
I use [take_until](docs.rs/take-until/l...), but take_while could work too
.map(|result| result .map(/* your Ok value logic */))
.take_until(|result| result .is_err()
.fold(|result| { let aggregate = result?/* rest of the fold logic here */ })
I use [take_until](docs.rs/take-until/l...), but take_while could work too