pub trait DistanceMap<K, V> {
// Required methods
fn build(num_elements: usize) -> Self;
fn get_item(&self, pos: K) -> Option<&V>;
fn put_item(&mut self, pos: K, val: V);
}
Expand description
A mapping for storing the distances of nodes for shortest path algorithms.
Required Methods§
Sourcefn build(num_elements: usize) -> Self
fn build(num_elements: usize) -> Self
Create mapping with support for items between 0 and num_elements - 1
.
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.