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

Method entries

cranelift/bforest/src/node.rs:67–73  ·  view source on GitHub ↗

Get the number of entries in this node. This is the number of outgoing edges in an inner node, or the number of key-value pairs in a leaf node.

(&self)

Source from the content-addressed store, hash-verified

65 /// This is the number of outgoing edges in an inner node, or the number of key-value pairs in
66 /// a leaf node.
67 pub fn entries(&self) -> usize {
68 match *self {
69 Self::Inner { size, .. } => usize::from(size) + 1,
70 Self::Leaf { size, .. } => usize::from(size),
71 Self::Free { .. } => panic!("freed node"),
72 }
73 }
74
75 /// Create an inner node with a single key and two sub-trees.
76 pub fn inner(left: Node, key: F::Key, right: Node) -> Self {

Callers 7

fmtMethod · 0.45
underflowed_nodeMethod · 0.45
normalizeMethod · 0.45
count_entriesFunction · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45

Calls 1

fromFunction · 0.85

Tested by 1

count_entriesFunction · 0.36