Skip to main content

Module altrep_impl

Module altrep_impl 

Source
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_region output 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.