MCPcopy Create free account
hub / github.com/douchuan/algorithm / get

Method get

src/strings/tst.rs:42–48  ·  view source on GitHub ↗

Returns the value associated with the given key.

(&self, key: &str)

Source from the content-addressed store, hash-verified

40
41 /// Returns the value associated with the given key.
42 pub fn get(&self, key: &str) -> Option<&T> {
43 if key.is_empty() {
44 None
45 } else {
46 unsafe { get_dth(self.root, key, 0).and_then(|p| p.as_ref().val.as_ref()) }
47 }
48 }
49
50 /// Inserts the key-value pair into the symbol table, overwriting the old value
51 /// with the new value if the key is already in the symbol table.

Callers 8

containsMethod · 0.45
longest_prefix_ofMethod · 0.45
to_indexMethod · 0.45
to_charMethod · 0.45
containsMethod · 0.45
indexMethod · 0.45
nameMethod · 0.45
newMethod · 0.45

Calls 2

get_dthFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected