Skip to main content

IteratorSource

Enum IteratorSource 

Source
pub enum IteratorSource {
    String(Arc<String>),
    Range {
        start: i64,
        end: i64,
        step: i64,
    },
    HashMap(HashMapKindedRef),
}
Expand description

Source backing a lazy iterator pipeline. Each variant holds a typed Arc<T> over an existing collection so iteration shares the receiver’s storage without a deep copy.

Range carries inline i64 bounds + step (no Arc payload); the post-§2.7.4 Range-value carrier rebuild is tracked separately, so for now Range sources are constructed by the iterator factory’s own receiver-decode path (Range receivers themselves remain a phase-2c surface; the field is provided in IteratorSource so the carrier is future-proof against the §2.3 / Q8 cardinality constraints).

Variants§

§

String(Arc<String>)

Iteration over a string receiver (per-codepoint).

§

Range

Iteration over a numeric range. start is inclusive, end is exclusive (matching 0..n Rust-shape range semantics); step is the per-iteration increment (always positive, defaulting to 1 for start..end ranges).

Fields

§start: i64
§end: i64
§step: i64
§

HashMap(HashMapKindedRef)

Iteration over a HashMap receiver. Per-entry yields are 2-element [key, value] inner arrays, mirroring the HashMap.entries() shape.

Wave 2 Round 3b C2-joint ckpt-2 (2026-05-14): payload flipped from Arc<HashMapData> (non-generic) to HashMapKindedRef per ADR-006 §2.7.24 Q25.B SUPERSEDED. Per-entry yields dispatch per-V at iteration time via the inner HashMapKindedRef arm.

Implementations§

Source§

impl IteratorSource

Source

pub fn len(&self) -> usize

Element count of the source — the upper bound on the cursor before any take/skip/filter is applied. For Range, computed from the (start, end, step) triple; for collections, the receiver length.

Trait Implementations§

Source§

impl Clone for IteratorSource

Source§

fn clone(&self) -> IteratorSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IteratorSource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,