mirror_mirror/
iter.rs

1use alloc::boxed::Box;
2
3use crate::Reflect;
4
5// Its not possible to implement this without boxing, because rust cannot prove that the borrows
6// from `next` don't overlap. That requires `LendingIterator`
7//
8// Its a type alias to make it clear that it allocates
9pub type ValueIterMut<'a> = Box<dyn Iterator<Item = &'a mut dyn Reflect> + 'a>;
10
11// Its not possible to implement this without boxing, because rust cannot prove that the borrows
12// from `next` don't overlap. That requires `LendingIterator`
13//
14// Its a type alias to make it clear that it allocates
15pub type PairIterMut<'a, T = str> = Box<dyn Iterator<Item = (&'a T, &'a mut dyn Reflect)> + 'a>;