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

Function build_meta

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

Source from the content-addressed store, hash-verified

349}
350
351pub fn build_meta(t: &Tables, arena_len: u32, errors_json: StrRef, duration_ms: f64) -> Vec<u8> {
352 let mut m = Vec::with_capacity(META_SIZE);
353 m.push(KERNEL_ABI_VERSION);
354 m.extend_from_slice(&[0u8; 3]);
355 m.extend_from_slice(&t.node_count.to_le_bytes());
356 m.extend_from_slice(&t.edge_count.to_le_bytes());
357 m.extend_from_slice(&t.ref_count.to_le_bytes());
358 m.extend_from_slice(&arena_len.to_le_bytes());
359 m.extend_from_slice(&errors_json.0.to_le_bytes());
360 m.extend_from_slice(&errors_json.1.to_le_bytes());
361 m.extend_from_slice(&duration_ms.to_le_bytes());
362 debug_assert_eq!(m.len(), META_SIZE);
363 m
364}
365
366#[cfg(test)]
367mod 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 1

pushMethod · 0.80

Tested by 1