Returns all keys in the symbol table as an Queue.
(&self)
| 30 | |
| 31 | /// Returns all keys in the symbol table as an Queue. |
| 32 | pub fn keys(&self) -> Queue<String> { |
| 33 | let mut queue = Queue::default(); |
| 34 | let mut prefix = String::new(); |
| 35 | unsafe { |
| 36 | collect_prefix(self.root, &mut prefix, &mut queue); |
| 37 | } |
| 38 | queue |
| 39 | } |
| 40 | |
| 41 | /// Returns the value associated with the given key. |
| 42 | pub fn get(&self, key: &str) -> Option<&T> { |