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

Function read_u64_be

nodedb-query/src/msgpack_scan/reader.rs:67–72  ·  view source on GitHub ↗
(buf: &[u8], pos: usize)

Source from the content-addressed store, hash-verified

65
66#[inline(always)]
67fn read_u64_be(buf: &[u8], pos: usize) -> Option<u64> {
68 let bytes = buf.get(pos..pos + 8)?;
69 Some(u64::from_be_bytes([
70 bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7],
71 ]))
72}
73
74/// Return `Some(offset + size)` only if the buffer has enough bytes.
75#[inline(always)]

Callers 3

read_f64Function · 0.85
read_i64Function · 0.85
read_valueFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected