MCPcopy Create free account
hub / github.com/hashintel/hash / next

Method next

libs/@local/hashql/core/src/graph/algorithms/mod.rs:193–203  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

191 type Item = N;
192
193 fn next(&mut self) -> Option<Self::Item> {
194 let next = self.stack.pop()?;
195
196 self.stack.extend(
197 self.graph
198 .successors(next)
199 .filter(|&id| self.visited.insert(id)),
200 );
201
202 Some(next)
203 }
204
205 fn size_hint(&self) -> (usize, Option<usize>) {
206 let remaining = self.graph.node_count() - self.visited.count();

Callers

nothing calls this directly

Calls 8

first_unsetMethod · 0.80
popMethod · 0.65
pushMethod · 0.65
extendMethod · 0.45
filterMethod · 0.45
successorsMethod · 0.45
insertMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected