MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / len

Method len

publication/code/chapter10/lru.rs:48–50  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

46 }
47
48 fn len(&self) -> usize {
49 self.map.len()
50 }
51
52 fn insert(&mut self, key: K, val: V) -> Option<V> {
53 if self.map.contains_key(&key) { // 存在 key 就更新

Callers 15

edit_distanceFunction · 0.45
edit_distance2Function · 0.45
encode_to_base58Method · 0.45
decode_from_base58Method · 0.45
get_indexMethod · 0.45
is_fullMethod · 0.45
insertMethod · 0.45
remove_from_listMethod · 0.45
ensure_roomMethod · 0.45
add_blockMethod · 0.45
add_blockMethod · 0.45
merkle_hash_strMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected