(t: &Tables, arena_len: u32, errors_json: StrRef, duration_ms: f64)
| 338 | } |
| 339 | |
| 340 | pub 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)] |
| 356 | mod tests { |
no outgoing calls