Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

HashMapEntry

Owns a key/value pair transferred out of a hash map.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. 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: Movable

Owns 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 ↗
Searching Development · language & standard library