Skip to main content

generate_direct_altrep_registration

Function generate_direct_altrep_registration 

Source
pub(crate) fn generate_direct_altrep_registration(
    ident: &Ident,
    generics: &Generics,
    class_name: &str,
) -> Result<TokenStream>
Expand description

Generates full ALTREP registration for a data struct.

Generates TypedExternal, AltrepClass, RegisterAltrep, IntoR, linkme entry, and Ref/Mut. The struct must already implement the low-level ALTREP traits (via impl_alt*_from_data! or #[derive(AltrepInteger)]) and InferBase.