MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / next

Method next

atomic-core/src/pristine/view_graph.rs:165–190  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

163 type Item = Result<SerializedGraphEdge, PristineError>;
164
165 fn next(&mut self) -> Option<Self::Item> {
166 if self.exhausted {
167 return None;
168 }
169
170 loop {
171 match self.inner.next() {
172 Some(Ok(edge)) => {
173 let introduced_by = edge.introduced_by();
174 if introduced_by == NodeId::ROOT || self.visibility.contains(introduced_by) {
175 return Some(Ok(edge));
176 }
177 // Skip edges not visible in this view
178 continue;
179 }
180 Some(Err(error)) => {
181 self.exhausted = true;
182 return Some(Err(error));
183 }
184 None => {
185 self.exhausted = true;
186 return None;
187 }
188 }
189 }
190 }
191}
192
193impl<'a, T: GraphTxnT> GraphTxnT for ViewGraph<'a, T> {

Callers 3

authored_anchorMethod · 0.45
defined_namesFunction · 0.45
decode_edge_keyFunction · 0.45

Calls 2

introduced_byMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected