Expand description
Naming helpers for the static symbols the #[miniextendr] attribute emits.
These formatters live in one place so the attribute macro and any later
consumer (e.g. a registration-chasing linter) can compute the exact same
identifiers from a source syn::Ident.
Enumsยง
- RData
Helper ๐ - The R helpers
#[derive(ExternalPtr)]emits for a typeโs sidecar fields and the$/[[field methods ofr_data_accessorscall (#1848).
Constantsยง
- R_
RESERVED_ ๐WORDS - Rโs reserved words: never usable as a bare name on the left of
<-.
Functionsยง
- all_
equal_ ๐c_ name C_<crate>__mx_all_equal_<Type>โ the field reader of theall.equal()method of#[derive(AllEqual)](#2149).- altrep_
reg_ ๐fn_ ident __mx_altrep_reg_<crate>_<Ident>โ ALTREP class registration fn.- apply_
rename_ ๐all - Apply a
rename_alltransformation to a variant name. - bare_
fn_ ๐c_ wrapper_ ident C_<crate>_<fn>โ bare-fn C wrapper identifier (internal-wrapper arm only;extern/#[export_name]fns pass through untouched and own their own cross-package uniqueness).- call_
slot_ ๐ident - The C wrapperโs call slot, declared by
CWrapperContextwithquote!. A reference inside aquote_spanned!template would take the user typeโs span instead. That only resolves while the macroโs call site is the userโs, not when the wrapper is generated inside amacro_rules!expansion, as a trait implโs is (#1489). So references interpolate this. - conditional_
bound_ ๐lifetime - The binder of a conditional bound,
for<'__mx_cond> FieldTy: Trait. - conversion_
error_ ๐ident - The error a failed argument conversion binds, for the same reason as
call_slot_ident: the binding and the expressions that read it are built in different templates. - crate_
prefix ๐ - The consuming crateโs name, used as the prefix for every macro-emitted
#[no_mangle]C symbol. - ident_
name ๐ - The userโs identifier as a plain name:
r#whereโ"where",xโ"x". - impl_
method_ ๐c_ wrapper_ ident C_<crate>_<Type>__<method>โ impl-method C wrapper identifier.- is_
r_ ๐package_ name - Rโs rule for a package name (Writing R Extensions, โThe DESCRIPTION
fileโ): ASCII letters, digits and
., at least two characters, starting with a letter and not ending in.. - is_
r_ ๐reserved_ word - Whether
nameis one of Rโs reserved words (if,in,TRUE,NA, โฆ). - is_
syntactic_ ๐r_ name - Whether
nameis a syntactic R name: ASCII letters, digits,.and_only; starts with a letter, or with a.that is not followed by a digit; and is not a reserved word. Anything else ([.foo,$.foo,==.foo,%in%.foo) has to be backtick-quoted in source. - name_
ident ๐ - A name (a column / list-element name, from a user field or a
rename) as a Rust identifier for a generated struct field or binding. Keywords come back raw sotypeemitsr#typeinstead of an unparsable token stream. - parse_
generic ๐ - Parse a
generic = "..."value. A generic may name its package,pkg::generic, with a valid R package name (ASCII letters, digits and.; at least two characters; starts with a letter; doesnโt end in.) and one::. - parse_
r_ ๐receiver - Parse a dispatch receiver that is safe to emit as a bare R symbol.
- r_
def_ ๐name - The left-hand side of a generated
<name> <- function(...)definition. - r_
namespace_ ๐name - The argument of a raw NAMESPACE directive such as
export(<name>). - r_
string_ ๐escape - Escape
sfor the inside of an R double-quoted string literal. Every generated R string literal built from user text goes through this (the precondition requirement text and the authorโs messages, the class names ininherits(), lifecycle arguments). - r_
wrapper_ ๐const_ ident_ for - Identifier for the registration entry holding the R wrapper source.
- rdata_
helper_ ๐name .rdata_<helper>_<Type>: the R name of a sidecar field helper, named by the Rust type (not an implโsclass = "..."), since the derive only knows the type.- self_
sexp_ ๐ident - The C wrapperโs receiver slot, shared with method extraction and return
handling. Its mixed-site span keeps a user parameter named
self_sexpfrom replacing the original R handle after conversion. - sidecar_
fallback_ ๐c_ name C_<crate>__mx_rdata_fallback_<Type>โ the field fallback of an S3, S4 or env class withr_data_accessors(fallback = "Self::f", #2150), which the impl block that has it emits.- sidecar_
fallback_ ๐names_ c_ name C_<crate>__mx_rdata_names_<Type>โ the names the field fallback answers, for.DollarNames()(fallback_names = "Self::g", #2150).- sidecar_
getter_ ๐c_ name C_<crate>__mx_rdata_get_<Type>_<field>โ sidecar field getter C symbol.- sidecar_
live_ ๐c_ name C_<crate>__mx_rdata_live_<Type>โ the liveness check of a type with#[externalptr(restored(refuse = "every_read"))](#1901).- sidecar_
setter_ ๐c_ name C_<crate>__mx_rdata_set_<Type>_<field>โ sidecar field setter C symbol.- split_
generic ๐ - A
generic = "..."value split into its package and the genericโs own name:"dplyr::dplyr_reconstruct"is(Some("dplyr"), "dplyr_reconstruct"),"print"is(None, "print"). The value must have passedparse_generic. - to_
kebab_ ๐case - Convert a PascalCase string to kebab-case (
InProgressโin-progress). - to_
snake_ ๐case - Convert a PascalCase string to snake_case.
- trait_
dispatch_ ๐ident - Trait dispatch registration; uses the same type suffix as its vtable.
- trait_
impl_ ๐wrappers_ ident - Wrapper fragment registered by either trait impl expansion path.
- trait_
member_ ๐c_ wrapper_ ident - Same as
trait_member_c_wrapper_string, as asyn::Identfor Rust token generation. - trait_
member_ ๐c_ wrapper_ string C_<crate>_<Type>__<Trait>__<member>as aStringโ shared byTraitMethodandTraitConst, and by both the ident and string forms each needs, so the format string canโt drift across the four call sites that used to duplicate it.- trait_
metadata_ ๐macro_ ident - A private export name for a traitโs metadata macro. The public macro is re-exported beside the trait under the traitโs own name, in Rustโs separate macro namespace, so imports carry both. An expansion-local suffix prevents same-named traits in different modules from colliding at the crate root. This name never enters the trait tag or any C/wasm registration symbol.
- trait_
method_ ๐shim_ ident - Generic shim defined beside a non-generic trait.
- trait_
tag_ ๐ident - Trait tag, shared by the declaration and both impl expansion paths.
- trait_
vtable_ ๐builder_ ident - Trait vtable builder, defined beside the trait and called from its impls.
- unraw ๐
- The userโs identifier without its
r#prefix, forformat_ident!/quote!interpolation into synthesized identifiers (__storage_where). Not for emitting the identifier itself โwhereis not a valid binding. - vtable_
layout_ ๐ident - Local repr(C) type for a concrete trait vtable. Only the static beside it is exported to C; this type reproduces the declarationโs supplied layout.
- vtable_
static_ ๐ident __VTABLE_<crate>_<Trait>_FOR_<Type>โ trait-impl vtable static. Preserve spelling: Rust distinguishesCounterfromcounter, as must both the Rust identifier and the exported linker symbol.type_namemay carry the existing generic-argument hash suffix.- vtshim_
ident ๐ __vtshim_<crate>_<Type>__<Trait>__<method>โ trait-impl vtable shim fn.