Trait orzir_core::graph::GraphNode

source ·
pub trait GraphNode<K, E>: Default
where K: Copy + Eq + Hash, E: GraphEdge<K>,
{ // Required methods fn key(&self) -> K; fn add_edge(&mut self, edge: E); fn for_each_edge<F>(&self, f: F) where F: FnMut(&E); // Provided method fn for_each_edge_to<F>(&self, key: K, f: F) where F: FnMut(&E) { ... } }
Expand description

A trait for graph nodes.

Required Methods§

source

fn key(&self) -> K

The key of the node.

source

fn add_edge(&mut self, edge: E)

Add an edge to the node.

source

fn for_each_edge<F>(&self, f: F)
where F: FnMut(&E),

Iterate over the edges of the node.

Provided Methods§

source

fn for_each_edge_to<F>(&self, key: K, f: F)
where F: FnMut(&E),

Iterate over the edges of the node that go to a specific key.

Object Safety§

This trait is not object safe.

Implementors§