pub trait DFSVisitor {
type Graph: VisitableGraph;
type Output: Default;
// Provided methods
fn init_node(
&mut self,
_graph: &Self::Graph,
_node: &NodeID,
) -> Result<Option<Self::Output>> { ... }
fn start_node(
&mut self,
_graph: &Self::Graph,
_node: &NodeID,
) -> Result<Option<Self::Output>> { ... }
fn discover_node(
&mut self,
_graph: &Self::Graph,
_node: &NodeID,
) -> Result<Option<Self::Output>> { ... }
fn finish_node(
&mut self,
_graph: &Self::Graph,
_node: &NodeID,
) -> Result<Option<Self::Output>> { ... }
fn examine_edge(
&mut self,
_graph: &Self::Graph,
_edge: &EdgeID,
) -> Result<Option<Self::Output>> { ... }
fn tree_edge(
&mut self,
_graph: &Self::Graph,
_edge: &EdgeID,
) -> Result<Option<Self::Output>> { ... }
fn back_edge(
&mut self,
_graph: &Self::Graph,
_edge: &EdgeID,
) -> Result<Option<Self::Output>> { ... }
fn forward_or_cross_edge(
&mut self,
_graph: &Self::Graph,
_edge: &EdgeID,
) -> Result<Option<Self::Output>> { ... }
fn finish_edge(
&mut self,
_graph: &Self::Graph,
_edge: &EdgeID,
) -> Result<Option<Self::Output>> { ... }
fn finish(&mut self, _graph: &Self::Graph) -> Result<Self::Output> { ... }
}Expand description
A visitor for depth-first search.