Skip to main content

impl_altlogical_from_data

Macro impl_altlogical_from_data 

Source
macro_rules! impl_altlogical_from_data {
    ($ty:ty) => { ... };
    ($ty:ty, dataptr) => { ... };
    ($ty:ty, serialize) => { ... };
    ($ty:ty, dataptr, serialize) => { ... };
    ($ty:ty, serialize, dataptr) => { ... };
    ($ty:ty, subset) => { ... };
    ($ty:ty, subset, serialize) => { ... };
    ($ty:ty, serialize, subset) => { ... };
    ($ty:ty, materializing_dataptr) => { ... };
    ($ty:ty, materializing_dataptr, serialize) => { ... };
}
Expand description

Generate ALTREP trait implementations for a type that implements AltLogicalData.

§Variants

// Basic (no dataptr, no serialization):
impl_altlogical_from_data!(MyType);

// With dataptr (type must implement AltrepDataptr<i32>):
impl_altlogical_from_data!(MyType, dataptr);

// With serialization (type must implement AltrepSerialize):
impl_altlogical_from_data!(MyType, serialize);

// With subset optimization (type must implement AltrepExtractSubset):
impl_altlogical_from_data!(MyType, subset);

// Combine multiple options:
impl_altlogical_from_data!(MyType, dataptr, serialize);
impl_altlogical_from_data!(MyType, subset, serialize);