pub unsafe trait SortedLender: Lender { }Expand description
Marker trait for lenders returned by SequentialLabeling::iter yielding
node ids in ascending order.
The AssumeSortedLender type can be used to wrap a lender and
unsafely implement this trait.
§Safety
The first element of the pairs returned by the iterator must go from zero to the number of nodes of the graph, excluded.
§Examples
To bind 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_lender<G>(g: G) where
G: SequentialLabeling,
for<'a> G::Lender<'a>: SortedLender,
{
// ...
}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.