Skip to main content

derive_altrep_real

Function derive_altrep_real 

Source
pub fn derive_altrep_real(input: DeriveInput) -> Result<TokenStream>
Expand description

Derive macro entry point for AltrepReal.

Auto-implements AltrepLen and AltRealData for a struct with a length field. The elt() method returns self.{elt_field} as f64 if #[altrep(elt = "...")] is specified, or f64::NAN (R’s NA_real_) by default.

Supports #[altrep(dataptr)] for direct f64 data pointer access and #[altrep(subset)] for Extract_subset.