Skip to main content

Module altrep

Module altrep 

Source
Expand description

Core ALTREP types and registration traits.

§Architecture

  • FFI: Raw setters/types in crate::ffi::altrep
  • Traits: Safe traits in crate::altrep_traits (Altrep, AltVec, AltInteger, etc.)
    • Required methods: Compiler-enforced by trait definition
    • Optional methods: Gated by HAS_* constants, defaults provided
  • Bridge: Generic extern "C-unwind" trampolines in crate::altrep_bridge
  • Macro: #[miniextendr] on a struct emits impl RegisterAltrep that:
    • Creates the class handle via R_make_alt*
    • Installs methods based on trait bounds and HAS_* consts

Enums§

RBase
Base type for ALTREP vectors.

Statics§

REGISTERED_CLASS_NAMES 🔒
Records every ALTREP class name registered during package_init().

Traits§

AltrepClass
Trait implemented by ALTREP classes via #[miniextendr].
RegisterAltrep
Registration trait: implemented per type by the macro on struct items.

Functions§

assert_altrep_class_uniqueness
Assert that all registered ALTREP class names are unique.
make_class_by_base
Create an ALTREP class handle based on the runtime base type.
validate_altrep_class
Validate that an ALTREP class handle was successfully created.