Returns the value associated with the given key.
(&self, key: &str)
| 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. |