Skip to main content

type_symbol

Function type_symbol 

Source
unsafe fn type_symbol<T: TypedExternal>() -> SEXP
Expand description

Get the interned R symbol for a type’s name.

R interns symbols via Rf_install, so the same string always returns the same pointer. The symbol is stable display metadata; Any::downcast is the authoritative type check.

§Safety

Must be called from R’s main thread.