Struct labelgraph::DirectedLabelGraph
source · pub struct DirectedLabelGraph<D> { /* private fields */ }
Expand description
Holds the nodes of the graph
Implementations
sourceimpl<D> DirectedLabelGraph<D>
impl<D> DirectedLabelGraph<D>
pub fn new() -> Self
pub fn check_node_exists(&self, node_label: &str) -> bool
pub fn create_node(&mut self, node_label: &str, node_data: D)
pub fn get_node_data(&self, node_label: &str) -> Option<&D>
pub fn get_mut_node_data(&mut self, node_label: &str) -> Option<&mut D>
pub fn link_nodes(
&mut self,
from_node_label: &str,
to_node_label: &str,
weight: i64
)
pub fn get_inputs_for_node(
&self,
node_label: &str
) -> Option<Vec<&LabelGraphEdge>>
pub fn get_outputs_for_node(
&self,
node_label: &str
) -> Option<Vec<&LabelGraphEdge>>
pub fn iter_node_data(&self) -> impl Iterator<Item = &D>
pub fn iter_node_label_and_data(&self) -> impl Iterator<Item = (&String, &D)>
Trait Implementations
sourceimpl<D: Debug> Debug for DirectedLabelGraph<D>
impl<D: Debug> Debug for DirectedLabelGraph<D>
Auto Trait Implementations
impl<D> RefUnwindSafe for DirectedLabelGraph<D>where
D: RefUnwindSafe,
impl<D> Send for DirectedLabelGraph<D>where
D: Send,
impl<D> Sync for DirectedLabelGraph<D>where
D: Sync,
impl<D> Unpin for DirectedLabelGraph<D>
impl<D> UnwindSafe for DirectedLabelGraph<D>where
D: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more