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

Method to_versioned_bytes

atomic-repository/src/repository/project_tree.rs:59–64  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

57 }
58
59 pub fn to_versioned_bytes(&self) -> Vec<u8> {
60 let mut encoder = Encoder::new();
61 encoder.u8(REPO_PATH_VERSION);
62 encoder.bytes(&self.0);
63 encoder.finish()
64 }
65
66 pub fn from_versioned_bytes(bytes: &[u8]) -> Result<Self, ProjectTreeError> {
67 let mut decoder = Decoder::new(bytes);

Callers

nothing calls this directly

Calls 3

u8Method · 0.80
bytesMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected