pub trait Pagify<T> {
// Required method
fn pagify(
&self,
bound: PageIndex,
) -> Box<dyn Iterator<Item = (PageIndex, &T)> + '_>;
}Expand description
A helper trait to deal with the page index of partial solutions.
This should only be called on the Vec<Solution> or similar types. If the solution is full,
then it returns a normal iterator that is just mapping the index (usize) to PageIndex.
if the solution is partial, it shifts the indices sufficiently so that the most significant page of the solution matches with the most significant page of the snapshot onchain.
See the tests below for examples.