alef 0.30.7

Opinionated polyglot binding generator for Rust libraries
Documentation
#' {{ name }}
#'
{% if kind == "register" -%}
#' Register an R-side plugin implementation. Pass a named list whose entries
#' implement the trait's required methods (e.g. `list(name = function() "my", ...)`).
#'
{% if method_docs -%}
#' The backend must implement the following methods (named entries in `r_backend`):
{% for m in method_docs -%}
#'   \item{ {{ m }} }
{% endfor -%}
#'
#' Each method receiving a known struct argument is handed the native binding object
#' (an external pointer with `$field` accessors), not a JSON string. Other arguments
#' (enums, opaque handles) arrive as JSON strings. A method may return either the native
#' binding object (an external pointer, for representable struct return types) or a
#' JSON-encoded string (e.g. via `jsonlite::toJSON`); other return shapes use a JSON string.
#'
{% endif -%}
#' @param r_backend Named list of R closures implementing the trait surface.
{% elif kind == "unregister" -%}
#' Unregister a previously registered plugin by name.
#'
#' @param name Plugin name string as returned by the backend's `name()` method.
{% elif kind == "clear" -%}
#' Remove every registered plugin of this type. Typically used in test teardown.
{% endif -%}
#'
#' @return Invisible NULL on success; raises an R error on failure.
#' @export