Skip to main content

Module builtins

Module builtins 

Source
Expand description

Built-in ALTREP data implementations for standard Rust types.

Provides AltIntegerData, AltRealData, AltLogicalData, AltRawData, AltStringData, and AltComplexData implementations for:

  • Vec<T> — owned vector (most common)
  • Box<[T]> — boxed slice
  • Range<T> — lazy arithmetic sequences (integer, real)
  • &'static [T] — borrowed slices (zero-copy from static data)
  • [T; N] — fixed-size arrays

Macros§

impl_dataptr_boxed 🔒
Implement AltrepDataptr for Box<[$elem]> (types with direct memory access)
impl_dataptr_cow 🔒
impl_dataptr_vec 🔒
Implement AltrepDataptr for Vec<$elem> (types with direct memory access)
impl_len_array 🔒
Implement AltrepLen for [$elem; N]
impl_len_boxed 🔒
Implement AltrepLen for Box<[$elem]>
impl_len_cow 🔒
impl_len_slice 🔒
Implement AltrepLen for &[$elem]
impl_len_vec 🔒
Implement AltrepLen for Vec<$elem>
impl_serialize 🔒
Implement AltrepSerialize for types that can be cloned and converted to/from R.
impl_serialize_cow 🔒