MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_bytes

Method read_bytes

nodedb/src/engine/timeseries/reader.rs:56–63  ·  view source on GitHub ↗
(&mut self, n: usize)

Source from the content-addressed store, hash-verified

54 }
55
56 fn read_bytes(&mut self, n: usize) -> Option<&'a [u8]> {
57 if self.remaining() < n {
58 return None;
59 }
60 let slice = &self.data[self.pos..self.pos + n];
61 self.pos += n;
62 Some(slice)
63 }
64
65 fn read_u8(&mut self) -> Option<u8> {
66 let b = self.read_bytes(1)?;

Callers 7

read_u8Method · 0.80
read_u16_leMethod · 0.80
read_u32_leMethod · 0.80
read_u64_leMethod · 0.80
decode_tseg_headerFunction · 0.80

Calls 1

remainingMethod · 0.45

Tested by

no test coverage detected