MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / Node

Class Node

src/structures/mmap_tree/node.rs:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28#[derive(Debug, PartialEq, Clone)]
29pub struct Node<K, V> {
30 pub keys: Vec<K>,
31 pub values: Vec<Option<V>>, // Option for handling deletion in COW
32 pub children: Vec<usize>, // Offsets into the memmap file
33 pub max_keys: usize, // Maximum number of keys a node can hold
34 pub node_type: NodeType,
35 pub offset: usize, // Offset into the memmap file
36 pub is_root: bool,
37 pub parent_offset: Option<usize>, // Offset of the parent node
38}
39
40impl<K, V> Node<K, V>
41where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected