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

Function count

atomic-core/examples/semantic_codec_lab/transforms.rs:30–37  ·  view source on GitHub ↗
(mut bytes: &[u8])

Source from the content-addressed store, hash-verified

28}
29
30fn count(mut bytes: &[u8]) -> Result<usize> {
31 let mut n = 0;
32 while !bytes.is_empty() {
33 get(&mut bytes)?;
34 n += 1;
35 }
36 Ok(n)
37}
38
39pub fn encode(method: u8, raw: &[u8]) -> Result<Vec<u8>> {
40 ensure!(raw.len() <= LIMIT, "raw column limit");

Callers 1

encodeFunction · 0.70

Calls 2

getFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected