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

Method header

nodedb-codec/src/vector_quant/layout.rs:217–221  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

215 /// Zero-copy reference to the header (first 32 bytes).
216 #[inline]
217 pub fn header(&self) -> &QuantHeader {
218 let ptr = self.buf.as_ptr() as *const QuantHeader;
219 // SAFETY: buf is always at least 32 bytes and QuantHeader is repr(C).
220 unsafe { &*ptr }
221 }
222
223 /// Slice of the packed-bit region.
224 #[inline]

Callers 10

outlier_countMethod · 0.45
outlier_atMethod · 0.45
header_field_roundtripFunction · 0.45

Calls 1

as_ptrMethod · 0.45

Tested by 2

header_field_roundtripFunction · 0.36