Skip to main content

Module state

Module state 

Source
Expand description

Core iterator-backed ALTREP data adaptors.

Provides IterState<I, T> (the shared lazy-caching state machine) and data-adaptor types for the integer/real/logical/raw ALTREP families: IterIntData, IterRealData, IterLogicalData, IterRawData. The string/complex adaptors live in super::coerce; the rooted list adaptor lives in super::list.

See the iterator-adaptor section in the altrep_data module docs for how to expose these adaptors to R: they implement only the data-level traits (AltrepLen + Alt*Data) and must be wrapped in a concrete #[derive(Altrep*)] + #[altrep(manual)] struct to back a live ALTREP vector.

Re-exportsยง

use super::macros::define_iter_data; ๐Ÿ”’
use std::cell::RefCell; ๐Ÿ”’
use std::sync::OnceLock; ๐Ÿ”’
use crate::altrep_data::AltIntegerData; ๐Ÿ”’
use crate::altrep_data::AltLogicalData; ๐Ÿ”’
use crate::altrep_data::AltRawData; ๐Ÿ”’
use crate::altrep_data::AltRealData; ๐Ÿ”’
use crate::altrep_data::AltrepLen; ๐Ÿ”’
use crate::altrep_data::Logical; ๐Ÿ”’

Structsยง

IterIntData
Iterator-backed integer vector data adaptor.
IterLogicalData
Iterator-backed logical vector data adaptor.
IterRLogicalData
Iterator-backed logical data retaining Rโ€™s native logical bit patterns.
IterRawData
Iterator-backed raw (u8) vector data adaptor.
IterRealData
Iterator-backed real (f64) vector data adaptor.
IterState
Core state for iterator-backed ALTREP vectors.