Skip to main content

PropertyIndex

Trait PropertyIndex 

Source
pub trait PropertyIndex:
    PropertyIndex
    + SnapshotWidth
    + Into<u64> {
    type ArrowType: ArrowPrimitiveType<Native = Self> + 'static;

    // Required method
    fn primitive_array(values: Vec<Self>) -> PrimitiveArray<Self::ArrowType>;
}
Expand description

Unsigned index width usable for sparse property indexes.

This is the thin Arrow-specific layer over the shared SnapshotWidth contract: the usize/little-endian-word conversions and SnapshotWidth::WIDTH_CODE resolve through that trait, so I::LittleEndianWord and I::to_le_word have one definition substrate-wide. This trait only adds the Arrow primitive-array vocabulary plus the Into<u64> diagnostic widening.

§Performance

Implementations perform conversions in O(1) and array construction in O(values.len()).

Required Associated Types§

Source

type ArrowType: ArrowPrimitiveType<Native = Self> + 'static

Arrow unsigned primitive type for sparse index arrays.

Required Methods§

Source

fn primitive_array(values: Vec<Self>) -> PrimitiveArray<Self::ArrowType>

Builds an Arrow primitive array from native index values.

§Performance

This function is O(values.len()).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PropertyIndex for u16

Source§

impl PropertyIndex for u32

Source§

impl PropertyIndex for u64

Implementors§