Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

HashSetIterator

Borrows set keys readonly in unspecified bucket order.

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.

HashSetIterator

pub final class HashSetIterator<K> where K: Movable

Borrows set keys readonly in unspecified bucket order.

Full traversal costs O(capacity), allocates nothing and skips deleted/empty buckets. Exhaustion is permanent. The cursor retains no owner; structural mutation, move/destruction invalidate it and yielded key references. K: Movable stored key type, always yielded readonly.

HashSetIterator.Next

pub fn Next() -> K&?

Advances once and borrows the next stored key readonly. Return: Optional readonly key reference, or none permanently after exhaustion. Warning: May scan absent buckets; owner invalidation rules apply.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library