pub trait PropertyIndex:
PropertyIndex
+ Copy
+ Ord {
type ArrowType: ArrowPrimitiveType<Native = Self> + 'static;
type LittleEndianWord: FromBytes + Immutable + IntoBytes + KnownLayout + Unaligned + Copy;
// Required methods
fn to_usize(self) -> Option<usize>;
fn from_usize(value: usize) -> Option<Self>;
fn from_u64(value: u64) -> Option<Self>;
fn to_u64(self) -> u64;
fn to_le_word(self) -> Self::LittleEndianWord;
fn from_le_word(word: Self::LittleEndianWord) -> Self;
fn primitive_array(values: Vec<Self>) -> PrimitiveArray<Self::ArrowType>;
}Expand description
Unsigned index width usable for sparse property indexes.
§Performance
Implementations perform checked conversions in O(1).
Required Associated Types§
Sourcetype ArrowType: ArrowPrimitiveType<Native = Self> + 'static
type ArrowType: ArrowPrimitiveType<Native = Self> + 'static
Arrow unsigned primitive type for sparse index arrays.
Sourcetype LittleEndianWord: FromBytes + Immutable + IntoBytes + KnownLayout + Unaligned + Copy
type LittleEndianWord: FromBytes + Immutable + IntoBytes + KnownLayout + Unaligned + Copy
Little-endian word used when this width appears in snapshots.
Required Methods§
Sourcefn to_usize(self) -> Option<usize>
fn to_usize(self) -> Option<usize>
Returns self as usize, or None if the target platform cannot hold it.
§Performance
This function is O(1).
Sourcefn from_usize(value: usize) -> Option<Self>
fn from_usize(value: usize) -> Option<Self>
Sourcefn to_le_word(self) -> Self::LittleEndianWord
fn to_le_word(self) -> Self::LittleEndianWord
Sourcefn from_le_word(word: Self::LittleEndianWord) -> Self
fn from_le_word(word: Self::LittleEndianWord) -> Self
Sourcefn primitive_array(values: Vec<Self>) -> PrimitiveArray<Self::ArrowType>
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".