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

Method from_canonical

atomic-core/src/operation/mod.rs:158–161  ·  view source on GitHub ↗
(heads: Vec<OperationId>)

Source from the content-addressed store, hash-verified

156 }
157
158 pub(crate) fn from_canonical(heads: Vec<OperationId>) -> Result<Self, OperationCodecError> {
159 ensure_strictly_sorted(&heads, "operation heads")?;
160 Ok(Self { heads })
161 }
162
163 /// Borrow heads in canonical ascending order.
164 pub fn as_slice(&self) -> &[OperationId] {

Callers

nothing calls this directly

Calls 1

ensure_strictly_sortedFunction · 0.85

Tested by

no test coverage detected