Skip to main content

Vertex

Trait Vertex 

Source
pub trait Vertex<K, V>
where K: Hash + Eq + Clone,
{ // Required methods fn get_value(&self) -> &V; fn get_mut_value(&mut self) -> &mut V; fn key(&self) -> K; }
Expand description

Generic behaviour of a vertex

Key type (K) must implement Hash, Eq and Clone

Value type is free

Required Methods§

Source

fn get_value(&self) -> &V

Source

fn get_mut_value(&mut self) -> &mut V

Source

fn key(&self) -> K

Implementors§

Source§

impl<K: Hash + Eq + Clone, V> Vertex<K, V> for SimpleVertex<K, V>

SimpleVertex implement the Vertex trait maintaining the key type and the value type generics