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

Method new

src/structures/tree.rs:20–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 V: Clone + TreeSerialization + TreeDeserialization + Display + Debug,
19{
20 pub fn new() -> Self {
21 Tree {
22 root: Box::new(Node::new_leaf()), // Initially the root is a leaf node
23 b: 4,
24 }
25 }
26
27 pub fn insert(&mut self, key: K, value: V) -> Result<(), io::Error> {
28 let mut root = std::mem::replace(&mut self.root, Box::new(Node::new_leaf()));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected