[][src]Trait generic_graph::Vertex

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

Generic behaviour of a vertex

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

Value type is free

Required methods

fn get_value(&self) -> &V

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

fn key(&self) -> K

Loading content...

Implementors

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

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

fn get_value(&self) -> &V[src]

Get the value stored in a vertex

fn get_mut_value(&mut self) -> &mut V[src]

Get the value as mutable reference

fn key(&self) -> K[src]

Returns the key of the vertex

Loading content...