View source: R/make_module_macro.R
make_module_macro | R Documentation |
Read some Rust source code, find functions or implementations with the
#[extendr]
attribute, and generate an extendr_module!
macro statement.
make_module_macro(code, module_name = "rextendr")
code |
Character vector containing Rust code. |
module_name |
Module name |
This function uses simple regular expressions to do the Rust parsing and can get confused by valid Rust code. It is only meant as a convenience for simple use cases. In particular, it cannot currently handle implementations for generics.
Character vector holding the contents of the generated macro statement.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.