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

BitSetIterator

Traverses a borrowed packed bit sequence as Boolean values.

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.

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