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_altcomplex_slice 🔒
AltComplexData for any container that derefs to [Rcomplex].
impl_altinteger_slice 🔒
AltIntegerData for any container that derefs to [i32].
impl_altlogical_native_slice 🔒
AltLogicalData for R-native logical slices, including NA and raw values.
impl_altlogical_slice 🔒
AltLogicalData for any container that derefs to [bool]. bool can’t be NA.
impl_altraw_slice 🔒
AltRawData for any container that derefs to [u8]. Raw has no NA.
impl_altreal_slice 🔒
AltRealData for any container that derefs to [f64].
impl_dataptr_array 🔒
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_owned_str_altrep_data 🔒
impl_serialize 🔒
Implement AltrepSerialize for types that can be cloned and converted to/from R.
impl_shared_slice_data 🔒
impl_shared_slice_dataptr 🔒

Functions§

real_slice_extreme 🔒
min / max for a double slice, following R’s rmin / rmax.
real_slice_no_na 🔒
no_na for a double slice: true only when no element is NA or NaN.
real_slice_sum 🔒
sum for a double slice, following R’s rsum.