Expand description
ALTREP implementation utilities.
This module provides helper functions for implementing ALTREP classes. The proc-macro uses these to generate trait implementations.
Use crate::altrep_data1_as (re-exported from externalptr) to extract
data from an ALTREPโs data1 slot.
Macrosยง
- altrep_
array_ ๐no_ na - no_na fragment for families that support it (Integer, Real).
- impl_
altrep_ ๐array_ numeric - Generate all ALTREP trait impls + InferBase for a numeric [T; N] array family.
Pass optional extra items via
extra { ... }to include in the family trait impl. - impl_
register_ ๐altrep_ builtin - Helper macro to implement RegisterAltrep for a builtin type.
Functionsยง
- altrep_
region_ โbuf - Create a mutable slice from an ALTREP
get_regionoutput buffer pointer. - checked_
mkchar โ - Create a CHARSXP from a Rust string, with checked length conversion.
- register_
builtin_ ๐altrep_ classes - Eagerly register all built-in ALTREP classes.