Skip to main content

Module iter

Module iter 

Source
Expand description

Iterator support for type sets.

Iterators are opaque values (TypedValue::Iter). The concrete iterator object is carried directly by the value.

The default type sets do not support iteration (their TypeSet::Iterator is the uninhabited NoIterator). WithIterator wraps any TypeSet and swaps in a real, reference-counted iterator (SomniIterator), enabling for loops (and any host function that produces a SomniIterator) for the wrapped type set.

Structsยง

SomniIterator
A live iterator value, backed by a reference-counted Rust iterator.
WithIterator
A TypeSet wrapper that adds iterator support to the wrapped type set T.