Crate extendr_macros

Source
Expand description

Macros for generating wrappers for rust functions.

Modulesยง

Macrosยง

  • Execute R code by parsing and evaluating tokens.
  • Execute R code by parsing and evaluating tokens but without expanding parameters.
  • Call a function or primitive defined by a text expression with arbitrary parameters. This currently works by parsing and evaluating the string in R, but will probably acquire some shortcuts for simple expressions, for example by caching symbols and constant values.
  • Define a module and export symbols to R Example:
  • Create a List R object from a list of name-value pairs.
  • Create a Pairlist R object from a list of name-value pairs.

Attribute Macrosยง

  • The #[extendr]-macro may be placed on three items

Derive Macrosยง

  • Enable the construction of dataframes from arrays of structures.
  • Derives an implementation of From<Struct> for Robj and From<&Struct> for Robj on this struct.
  • Derives an implementation of TryFrom<Robj> for Struct and TryFrom<&Robj> for Struct on this struct.