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

Function snap

atomic-objects/src/view_snapshot.rs:195–204  ·  view source on GitHub ↗
(scope: ViewScopeLabel, parent: Option<&str>, own: &[&str])

Source from the content-addressed store, hash-verified

193 use super::*;
194
195 fn snap(scope: ViewScopeLabel, parent: Option<&str>, own: &[&str]) -> ViewSnapshot {
196 ViewSnapshot::new(
197 scope,
198 parent.map(|s| s.to_string()),
199 vec![],
200 own.iter().map(|s| s.to_string()).collect(),
201 "SETID".to_string(),
202 own.last().map(|_| "MERKLE".to_string()),
203 )
204 }
205
206 #[test]
207 fn content_key_is_deterministic_and_bytes_roundtrip() {

Calls 2

lastMethod · 0.80
iterMethod · 0.45