MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / leaf_crit_key

Method leaf_crit_key

cranelift/bforest/src/node.rs:154–162  ·  view source on GitHub ↗

Get the critical key for a leaf node. This is simply the first key.

(&self)

Source from the content-addressed store, hash-verified

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]`.

Callers 1

update_crit_keyMethod · 0.80

Calls 1

borrowMethod · 0.45

Tested by

no test coverage detected