MCPcopy Create free account
hub / github.com/RustCrypto/utils / parse

Method parse

blobby/src/decode.rs:67–75  ·  view source on GitHub ↗

Parse blobby header. # Errors If data could not be parsed successfully.

(data: &mut &[u8])

Source from the content-addressed store, hash-verified

65 /// # Errors
66 /// If data could not be parsed successfully.
67 pub const fn parse(data: &mut &[u8]) -> Result<Self, Error> {
68 match (read_vlq(data), read_vlq(data)) {
69 (Ok(items_len), Ok(dedup_len)) => Ok(Header {
70 items_len,
71 dedup_len,
72 }),
73 (Err(err), _) | (Ok(_), Err(err)) => Err(err),
74 }
75 }
76}
77
78/// Parse blobby data into an array.

Callers

nothing calls this directly

Calls 1

read_vlqFunction · 0.85

Tested by

no test coverage detected