Skip to main content

RegisterAltrep

Trait RegisterAltrep 

Source
pub trait RegisterAltrep {
    // Required method
    fn get_or_init_class() -> R_altrep_class_t;
}
Expand description

Registration trait: implemented per type by the macro on struct items.

The get_or_init_class method returns the ALTREP class handle, initializing it on first call and returning the cached handle on subsequent calls.

This trait combines class creation and method installation into a single get_or_init_class call that caches the result.

Required Methods§

Source

fn get_or_init_class() -> R_altrep_class_t

Get the ALTREP class handle, initializing it if this is the first call.

The implementation should:

  1. Create the class handle via R_make_alt* (or via InferBase::make_class)
  2. Install methods via install_* functions from altrep_bridge
  3. Cache the result in a static OnceLock

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.

Implementations on Foreign Types§

Source§

impl RegisterAltrep for Cow<'static, [f64]>

Source§

impl RegisterAltrep for Cow<'static, [i32]>

Source§

impl RegisterAltrep for Cow<'static, [u8]>

Source§

impl RegisterAltrep for Cow<'static, [Rcomplex]>

Source§

impl RegisterAltrep for Box<[bool]>

Source§

impl RegisterAltrep for Box<[f64]>

Source§

impl RegisterAltrep for Box<[i32]>

Source§

impl RegisterAltrep for Box<[u8]>

Source§

impl RegisterAltrep for Box<[Rcomplex]>

Source§

impl RegisterAltrep for Box<[String]>

Source§

impl RegisterAltrep for Vec<Cow<'static, str>>

Source§

impl RegisterAltrep for Vec<Option<Cow<'static, str>>>

Source§

impl RegisterAltrep for Vec<Option<String>>

Source§

impl RegisterAltrep for Vec<bool>

Source§

impl RegisterAltrep for Vec<f64>

Source§

impl RegisterAltrep for Vec<i32>

Source§

impl RegisterAltrep for Vec<u8>

Source§

impl RegisterAltrep for Vec<Rcomplex>

Source§

impl RegisterAltrep for Vec<String>

Source§

impl RegisterAltrep for Range<f64>

Source§

impl RegisterAltrep for Range<i32>

Source§

impl RegisterAltrep for Range<i64>

Implementors§