Skip to main content

AltrepList

Derive Macro AltrepList 

Source
#[derive(AltrepList)]
{
    // Attributes available to this derive:
    #[altrep]
    #[r_data]
}
Expand description

Derive macro for ALTREP list vector data types.

Auto-implements AltrepLen and AltListData traits. Supports the same #[altrep(...)] attributes as AltrepInteger, except dataptr and subset which are not supported for list ALTREP.

The generated class accepts R’s writes (x[[i]] <- v): the first one copies the elements into a plain list in data2, which element reads use from then on.