MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / build_meta

Function build_meta

codegraph-kernel/src/buffers.rs:340–353  ·  view source on GitHub ↗
(t: &Tables, arena_len: u32, errors_json: StrRef, duration_ms: f64)

Source from the content-addressed store, hash-verified

338}
339
340pub fn build_meta(t: &Tables, arena_len: u32, errors_json: StrRef, duration_ms: f64) -> Vec<u8> {
341 let mut m = Vec::with_capacity(META_SIZE);
342 m.push(KERNEL_ABI_VERSION);
343 m.extend_from_slice(&[0u8; 3]);
344 m.extend_from_slice(&t.node_count.to_le_bytes());
345 m.extend_from_slice(&t.edge_count.to_le_bytes());
346 m.extend_from_slice(&t.ref_count.to_le_bytes());
347 m.extend_from_slice(&arena_len.to_le_bytes());
348 m.extend_from_slice(&errors_json.0.to_le_bytes());
349 m.extend_from_slice(&errors_json.1.to_le_bytes());
350 m.extend_from_slice(&duration_ms.to_le_bytes());
351 debug_assert_eq!(m.len(), META_SIZE);
352 m
353}
354
355#[cfg(test)]
356mod tests {

Callers 15

extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85
extractFunction · 0.85

Calls

no outgoing calls

Tested by 1