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

Method from_versioned_bytes

atomic-repository/src/repository/project_tree.rs:66–72  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

64 }
65
66 pub fn from_versioned_bytes(bytes: &[u8]) -> Result<Self, ProjectTreeError> {
67 let mut decoder = Decoder::new(bytes);
68 decoder.version(REPO_PATH_VERSION, "RepoPath")?;
69 let path = Self::new(decoder.bytes()?.to_vec())?;
70 decoder.finish()?;
71 Ok(path)
72 }
73
74 /// Convert a native path without normalization or replacement characters.
75 #[cfg(unix)]

Callers

nothing calls this directly

Calls 3

versionMethod · 0.80
bytesMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected