pub trait InferBase {
const BASE: RBase;
// Required methods
unsafe fn make_class(
class_name: *const i8,
pkg_name: *const i8,
) -> R_altrep_class_t;
unsafe fn install_methods(cls: R_altrep_class_t);
}Expand description
Trait for inferring the R base type from a data type’s implemented traits.
This is automatically implemented via blanket impls for types that implement
one of the Alt*Data traits. It allows the #[miniextendr] macro to infer
the base type without requiring an explicit base = \"...\" attribute.
Required Associated Constants§
Required Methods§
Sourceunsafe fn make_class(
class_name: *const i8,
pkg_name: *const i8,
) -> R_altrep_class_t
unsafe fn make_class( class_name: *const i8, pkg_name: *const i8, ) -> R_altrep_class_t
Sourceunsafe fn install_methods(cls: R_altrep_class_t)
unsafe fn install_methods(cls: R_altrep_class_t)
Install ALTREP methods on the class.
§Safety
Must be called during R initialization with a valid class handle.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.