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

Method leaves

atomic-core/src/change/ops.rs:356–372  ·  view source on GitHub ↗
(
            ops: &mut [LeafOp],
            f: &mut impl FnMut(crate::types::NodeId) -> Result<crate::types::NodeId, E>,
        )

Source from the content-addressed store, hash-verified

354 Ok(())
355 }
356 fn leaves<E>(
357 ops: &mut [LeafOp],
358 f: &mut impl FnMut(crate::types::NodeId) -> Result<crate::types::NodeId, E>,
359 ) -> Result<(), E> {
360 for op in ops {
361 match op {
362 LeafOp::Insert {
363 after: Some(id), ..
364 } => leaf(id, f)?,
365 LeafOp::Delete { leaf: id }
366 | LeafOp::Replace { leaf: id, .. }
367 | LeafOp::Restore { leaf: id } => leaf(id, f)?,
368 LeafOp::Insert { after: None, .. } => {}
369 }
370 }
371 Ok(())
372 }
373 trunk(&mut self.trunk_id, &mut remap)?;
374 match &mut self.trunk_op {
375 Some(TrunkOp::Delete { trunk: id })

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected