[][src]Trait btree_dag::GetVertexValue

pub trait GetVertexValue<T> where
    T: Ord
{ fn get_vertex_value(&self, x: T) -> Option<&BTreeSet<T>>; }

GetVertexValue returns the value associated with the vertex x.

Example

extern crate alloc;
use alloc::collections::btree_set::BTreeSet;
use btree_dag::{BTreeDag, AddVertex, AddEdge, GetVertexValue};
let mut dag: BTreeDag<String> = BTreeDag::new();
dag.add_vertex(String::from("origin"));
dag.add_vertex(String::from("destination"));
dag.add_edge(String::from("origin"), String::from("destination"));

let vertex_value: &BTreeSet<String> = dag.get_vertex_value(String::from("origin")).unwrap();
assert!(vertex_value.contains(&String::from("destination")));

Required methods

fn get_vertex_value(&self, x: T) -> Option<&BTreeSet<T>>[src]

Loading content...

Implementors

impl<T> GetVertexValue<T> for BTreeDag<T> where
    T: Ord
[src]

Loading content...