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

IndexedItem

Pairs a traversal index with an exact value or reference item.

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

import std.iteration;

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

IndexedItem

pub final class IndexedItem<T> where T: Movable

Pairs a traversal index with an exact value or reference item.

This record owns transferred values and retains reference aliases without owning their backing. It adds no allocation or synchronization. Borrowed fields expire under their source's invalidation rules; concurrent writes require external synchronization. Present carriers transfer owning payloads through their selected lifecycle; reference carriers preserve aliases without moving their referents. T: Exact Movable source item type.

IndexedItem.Index

pub Index: usize;

Zero-based or explicitly seeded checked traversal index.

IndexedItem.Value

pub Value: T;

Exact owned item or borrowed alias retaining its original access.

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