method Map.iter
Lazy iterator over a snapshot of the (key, value) entries (insertion order).
Example:
fn main() io {
let m = {"a": 1, "b": 2}
for (k, v) in m.iter() {
print("{k}={v}")
}
}Output
a=1 b=2
pub(api) fn iter() -> iter<(K, V)>Complexity. O(n) to take the snapshot.
Since. 1.0.0-beta
Returns
iter<(K, V)>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:878