Skip to main content

Module miniextendr_fn

Module miniextendr_fn 

Source
Expand description

Function signature parsing for #[miniextendr].

This module handles parsing and normalizing Rust function signatures for the #[miniextendr] attribute macro. It provides:

StructsΒ§

MiniextendrFnAttrs πŸ”’
Parsed arguments for the #[miniextendr(...)] attribute on functions.
MiniextendrFunctionParsed πŸ”’
Parsed + normalized Rust function item for #[miniextendr].
ParamAttrs πŸ”’
Collapsed per-parameter attribute state for a single function parameter.
PerParamMiniextendrAttr πŸ”’
Parsed per-parameter #[miniextendr(...)] attribute content.
ROnExit πŸ”’
Parsed r_on_exit attribute for on.exit() cleanup code in R wrappers.

EnumsΒ§

CoercionMapping πŸ”’
Result of coercion analysis for a type. Contains the R native type to extract from SEXP and the target type to coerce to.
ReturnPref πŸ”’
Preferred return-conversion path for IntoR.

ConstantsΒ§

FN_BOOL_FLAGS_HELP πŸ”’
Comma-separated list of all fn-level boolean flags, for error messages.
FN_NESTED_OPTIONS_HELP πŸ”’
Comma-separated list of fn-level nested options, for error messages.

FunctionsΒ§

get_missing_inner_type πŸ”’
Extract the inner type T from Missing<T>, if the type is Missing<T>.
is_dots_type πŸ”’
Check if a type is Dots or &Dots (the variadic ... parameter type).
is_miniextendr_choices_attr πŸ”’
Returns true if attr is a #[miniextendr(...)] attribute containing choices(...).
is_miniextendr_coerce_attr πŸ”’
Returns true if attr is a #[miniextendr(...)] attribute containing coerce.
is_miniextendr_match_arg_attr πŸ”’
Returns true if attr is a #[miniextendr(...)] attribute containing match_arg.
is_miniextendr_several_ok_attr πŸ”’
Returns true if attr is a #[miniextendr(...)] attribute containing several_ok.
is_missing_type πŸ”’
Check if a type is Missing<T>.
is_vector_like_type πŸ”’
Check if a type is a vector-like type that several_ok can populate.
parse_choices_attr πŸ”’
Extracts the list of choice strings from a #[miniextendr(choices("a", "b", "c"))] attribute.
parse_default_attr πŸ”’
Extracts the default value from a #[miniextendr(default = "...")] attribute.
parse_lit_str πŸ”’
Parse the value of a name = "..." meta item as a string literal.
parse_per_param_attr πŸ”’
Parse all per-parameter options from a #[miniextendr(...)] attribute.
type_ends_with πŸ”’
Check if a type path ends with the given identifier (e.g., β€œDots”, β€œMissing”).
validate_param_type πŸ”’
Validate a parameter’s type for Missing and Dots conflicts.
validate_per_param_attr_conflicts πŸ”’
Validate per-parameter attribute conflicts.