pub trait Graph {
type NodeLabel;
type EdgeLabel;
fn is_directed(&self) -> bool;
fn node_count(&self) -> usize;
fn node_label(&self, node: NodeIndex) -> Option<&Self::NodeLabel>;
fn neighbors(&self, node: NodeIndex, direction: Direction) -> impl Iterator<Item = NodeIndex>;
fn contains_edge(&self, source: NodeIndex, target: NodeIndex) -> bool;
fn edge_label(&self, source: NodeIndex, target: NodeIndex) -> Option<&Self::EdgeLabel>;
}
pub type NodeIndex = usize;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Direction {
Outgoing,
Incoming,
}