Get the critical key for a leaf node. This is simply the first key.
(&self)
| 152 | /// Get the critical key for a leaf node. |
| 153 | /// This is simply the first key. |
| 154 | pub fn leaf_crit_key(&self) -> F::Key { |
| 155 | match *self { |
| 156 | Self::Leaf { size, ref keys, .. } => { |
| 157 | debug_assert!(size > 0, "Empty leaf node"); |
| 158 | keys.borrow()[0] |
| 159 | } |
| 160 | _ => panic!("Expected leaf node"), |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /// Try to insert `(key, node)` at key-position `index` in an inner node. |
| 165 | /// This means that `key` is inserted at `keys[i]` and `node` is inserted at `tree[i + 1]`. |