I've never used Rust - in a conventional language you'd just have a mutable variable defined outside of the loop and used and incremented inside of the loop. I assume Rust's for-loops can't access the outside variable scope that way?
Like (pseudocode)
var i = 0
for(item in items) {
item.DoThing(i)
i+=1
}
Does rust not allow that kind of mutation and access of a variable from outside the loop within the loop?