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

BitSetIterator

Traverses a borrowed packed bit sequence as Boolean values.

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.

BitSetIterator

pub final class BitSetIterator

Traverses a borrowed packed bit sequence as Boolean values.

The cursor owns no storage and allocates nothing. Each Next costs O(1) and exhaustion is permanent. Owner mutation, move and destruction invalidate it; external synchronization is required. Packed bits have no addressable bool storage, so this cursor yields values rather than reference proxies.

BitSetIterator.Next

pub fn Next() -> bool?

Reads the next packed bit and advances the cursor. Return: Some Boolean value, or none after all logical bits were read. Warning: The owner must remain live and unmodified during traversal.

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