0.2.0 Preview 1 · Frozen documentation
HashMapEntry
Owns a key/value pair transferred out of a hash map.
Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →
Module std.collections
import std.collections;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
HashMapEntry
pub final class HashMapEntry<K, V> where K: Movable where V: MovableOwns a key/value pair transferred out of a hash map. K: Movable owned key type. V: Movable owned value type.
HashMapEntry.Key
pub Key: K;Owns the transferred key, freely mutable outside map storage.
HashMapEntry.Value
pub Value: V;Owns the transferred associated value.
HashMapEntry.init
pub init(mut Key: K, mut Value: V)Transfers both inputs into an owned pair without allocation. Key: Owned key moved into the pair. Value: Owned associated value moved into the pair.
HashMapEntry.init
pub init(Source: mut Self&&)Transfers an owned pair through selected member move constructors. Source: Writable pair left destructible; no member move assignment is required.
Documentation snapshot: October 24, 2026 About versions ↗