Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ contains
Method
contains
publication/code/chapter10/lru.rs:112–114 ·
view source on GitHub ↗
(&mut self, key: &K)
Source
from the content-addressed store, hash-verified
110
}
111
112
fn contains(&mut self, key: &K) -> bool {
113
self.map.contains_key(key)
114
}
115
116
// 获取某个 key 的值,移除原来位置的值并在头部加入
117
fn access(&mut self, key: &K) {
Callers
3
get
Method · 0.45
get_mut
Method · 0.45
try_insert
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected