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

Method iter

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

Returns an iterator over all the key-value pairs in the map.

(&self)

Source from the content-addressed store, hash-verified

142
143 /// Returns an iterator over all the key-value pairs in the map.
144 pub fn iter(&self) -> impl ExactSizeIterator<Item = (&K, &V)> {
145 match self {
146 Self::Small(list) => Either::Left(list.iter().map(|(k, v)| (k, v))),
147 Self::Large(map) => Either::Right(map.iter()),
148 }
149 }
150
151 /// Returns an iterator over all the keys in the map.
152 pub fn keys(&self) -> impl ExactSizeIterator<Item = &K> {

Callers

nothing calls this directly

Calls 2

iterMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected