pub struct Digraph<Node: Hash + Eq, Edge> { /* private fields */ }
Implementations§
Source§impl<Node: Hash + Eq + Clone, Edge> Digraph<Node, Edge>
impl<Node: Hash + Eq + Clone, Edge> Digraph<Node, Edge>
Sourcepub fn dfs<F>(&self, f: F, start: Node)where
F: FnMut(Node),
pub fn dfs<F>(&self, f: F, start: Node)where
F: FnMut(Node),
Conducts a depth-first search (DFS) starting from start
, calling f
on each node encountered in DFS order. This function performs multiple
clone()
s of the nodes, which is still performant when nodes are
smart pointers such as Rc
.
Requires: start
is in the graph.
Auto Trait Implementations§
impl<Node, Edge> Freeze for Digraph<Node, Edge>
impl<Node, Edge> RefUnwindSafe for Digraph<Node, Edge>where
Node: RefUnwindSafe,
Edge: RefUnwindSafe,
impl<Node, Edge> Send for Digraph<Node, Edge>
impl<Node, Edge> Sync for Digraph<Node, Edge>
impl<Node, Edge> Unpin for Digraph<Node, Edge>
impl<Node, Edge> UnwindSafe for Digraph<Node, Edge>where
Node: UnwindSafe,
Edge: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more