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

Method expand_new_edge

atomic-core/src/change/format_v3/compact/compactor.rs:210–222  ·  view source on GitHub ↗

Convert a [`CompactNewEdge`] to a `NewEdge >`.

(&self, e: &CompactNewEdge)

Source from the content-addressed store, hash-verified

208
209 /// Convert a [`CompactNewEdge`] to a `NewEdge<Option<Hash>>`.
210 pub fn expand_new_edge(&self, e: &CompactNewEdge) -> FormatResult<NewEdge<Option<Hash>>> {
211 let from = self.expand_position(&e.from)?;
212 let to = self.expand_graph_node(&e.to)?;
213 let introduced_by = self.index_to_hash(e.introduced_by)?;
214
215 Ok(NewEdge {
216 previous: EdgeFlags::from_bits_truncate(e.previous),
217 flag: EdgeFlags::from_bits_truncate(e.flag),
218 from,
219 to,
220 introduced_by,
221 })
222 }
223
224 /// Convert a [`CompactEdgeUpdate`] to an `EdgeUpdate<Option<Hash>>`.
225 pub fn expand_edge_update(

Calls 3

expand_positionMethod · 0.80
expand_graph_nodeMethod · 0.80
index_to_hashMethod · 0.80