MergeIndex

Trait MergeIndex 

pub trait MergeIndex:
    PartialEq
    + Eq
    + Copy {
    // Required method
    fn index(&self) -> Option<usize>;
}
Expand description

An index for the merge_n function.

This trait allows the indices argument for merge_n to be stored using a more compact representation than usize when the input arrays are small. If the number of input arrays is less than 256 for instance, the indices can be stored as u8.

Implementation must ensure that all values which return None from MergeIndex::index are considered equal by the PartialEq and Eq implementations.

Required Methods§

fn index(&self) -> Option<usize>

Returns the index value as an Option<usize>.

None values returned by this function indicate holes in the index array and will result in null values in the array created by merge.

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§

§

impl MergeIndex for Option<usize>

§

fn index(&self) -> Option<usize>

§

impl MergeIndex for usize

§

fn index(&self) -> Option<usize>

Implementors§