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

Method new_leaf

src/structures/mmap_tree/node.rs:45–56  ·  view source on GitHub ↗
(offset: usize)

Source from the content-addressed store, hash-verified

43 V: Clone + TreeSerialization + TreeDeserialization,
44{
45 pub fn new_leaf(offset: usize) -> Self {
46 Node {
47 keys: Vec::new(),
48 values: Vec::new(),
49 children: Vec::new(),
50 max_keys: MAX_KEYS, // Assuming a small number for testing purposes
51 node_type: NodeType::Leaf,
52 offset,
53 is_root: false,
54 parent_offset: Some(0),
55 }
56 }
57
58 pub fn new_internal(offset: usize) -> Self {
59 Node {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected