pub fn derive_altrep_list(input: DeriveInput) -> Result<TokenStream>Expand description
Derive macro entry point for AltrepList.
Auto-implements AltrepLen and AltListData for a struct with a length field.
The elt() method returns self.{elt_field}[i] as SEXP if
#[altrep(elt = "...")] is specified (the field should be indexable and return SEXP),
or R_NilValue by default.
List ALTREP does not support #[altrep(dataptr)] or #[altrep(subset)] – both
are rejected at compile time. #[altrep(serialize)] is supported. The class
takes R’s writes through altrep_impl::altlist_set_elt, which copies the
elements into data2 on the first one; Elt reads data2 from then on.