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

TypedAsyncIterator

Names exact async item/error types without external associated projections. Structural satisfaction preserves safe task/result/optional shape and exact item ownership/access. Mutable steps must not overlap; errors and borrowed item validity remain the concrete source's contract. No runtime box is added.

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.iteration

import std.iteration;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

TypedAsyncIterator

pub concept TypedAsyncIterator<Self, T, E>

Names exact async item/error types without external associated projections. Structural satisfaction preserves safe task/result/optional shape and exact item ownership/access. Mutable steps must not overlap; errors and borrowed item validity remain the concrete source's contract. No runtime box is added. Self: Concrete mutable cursor. T: Exact optional item type, including reference access. E: Exact portable source-specific error type.

TypedAsyncIterator.NextAsync

requires fn NextAsync(Token: CancellationToken) -> Task<Result<T?, E>>;

Starts one exact incremental step. Token: Owned cancellation observation for the step. Return: Task yielding optional exact T or exact E.

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