pub unsafe trait SortedIterator: Iterator { }Expand description
Marker trait for Iterators yielding labels in the order induced by
enumerating the successors in ascending order.
The AssumeSortedIterator type can be used to wrap an iterator and
unsafely implement this trait.
§Safety
The labels returned by the iterator must be in the order in which they would be if successors were returned in ascending order.
§Examples
To bind the iterators returned by the lender returned by
SequentialLabeling::iter to implement this trait, you must use
higher-rank trait bounds:
use webgraph::traits::*;
fn takes_labeling_with_sorted_iterators<G>(g: G) where
G: SequentialLabeling,
for<'a, 'b> LenderIntoIter<'b, G::Lender<'a>>: SortedIterator,
{
// ...
}