MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / get

Method get

crates/data-structures/src/small_map.rs:176–181  ·  view source on GitHub ↗

Returns the value for `key`, if any.

(&self, key: &K)

Source from the content-addressed store, hash-verified

174
175 /// Returns the value for `key`, if any.
176 pub fn get(&self, key: &K) -> Option<&V> {
177 match self {
178 Self::Small(list) => list.iter().find_map(|(k, v)| (k == key).then_some(v)),
179 Self::Large(map) => map.get(key),
180 }
181 }
182
183 /// Returns the value for `key`, mutably, if any.
184 pub fn get_mut(&mut self, key: &K) -> Option<&mut V> {

Callers

nothing calls this directly

Calls 1

iterMethod · 0.65

Tested by

no test coverage detected