pub trait Kinship<K, V>: AnyGraph<K, V>{
// Required methods
fn successors(&self) -> HashMap<Vertex<K, V>, Vec<Edge<K>>>;
fn predecessors(&self) -> HashMap<Vertex<K, V>, Vec<Edge<K>>>;
// Provided methods
fn successors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>> { ... }
fn predecessors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>> { ... }
fn key_vertex_map(&self) -> HashMap<K, Vertex<K, V>> { ... }
}
Expand description
An interface for getting the successors and predecessors of each Vertex
.
Required Methods§
Provided Methods§
Sourcefn successors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>>
fn successors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>>
Get the successors of each vertex where the key is a Key
.
Sourcefn predecessors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>>
fn predecessors_as_key_and_edges(&self) -> HashMap<K, Vec<Edge<K>>>
Get the predecessors of each vertex where the key is a Key
.
Sourcefn key_vertex_map(&self) -> HashMap<K, Vertex<K, V>>
fn key_vertex_map(&self) -> HashMap<K, Vertex<K, V>>
Get the map of key and vertex.
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.