pub struct Dfs<Node> { /* private fields */ }Expand description
An iterative depth-first traversal.
Implementations§
Source§impl<Node> Dfs<Node>
impl<Node> Dfs<Node>
Sourcepub fn new(roots: impl IntoIterator<Item = Node>) -> Self
pub fn new(roots: impl IntoIterator<Item = Node>) -> Self
Create a new DFS traversal, starting at the given roots.
Sourcepub fn add_root(&mut self, root: Node)
pub fn add_root(&mut self, root: Node)
Add a single new root to this traversal, to be visited immediately.
Sourcepub fn add_roots(&mut self, roots: impl IntoIterator<Item = Node>)
pub fn add_roots(&mut self, roots: impl IntoIterator<Item = Node>)
Add multiple new roots to this traversal, to be visited immediately.
Trait Implementations§
Auto Trait Implementations§
impl<Node> Freeze for Dfs<Node>
impl<Node> RefUnwindSafe for Dfs<Node>where
Node: RefUnwindSafe,
impl<Node> Send for Dfs<Node>where
Node: Send,
impl<Node> Sync for Dfs<Node>where
Node: Sync,
impl<Node> Unpin for Dfs<Node>where
Node: Unpin,
impl<Node> UnwindSafe for Dfs<Node>where
Node: 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