Skip to main content

SortKey

Trait SortKey 

Source
pub trait SortKey {
    // Required method
    fn sort_key(&self) -> u64;
}
Expand description

The core trait of zan-sort. It maps any arbitrary data type into a strictly ordered, 1-dimensional u64 space. In this algorithm, the u64 representation is the absolute truth for ordering.

Required Methods§

Source

fn sort_key(&self) -> u64

Implementations on Foreign Types§

Source§

impl SortKey for f32

Source§

fn sort_key(&self) -> u64

Source§

impl SortKey for f64

Source§

fn sort_key(&self) -> u64

Source§

impl SortKey for i32

Source§

fn sort_key(&self) -> u64

Source§

impl SortKey for i64

Source§

fn sort_key(&self) -> u64

Source§

impl SortKey for u32

Source§

fn sort_key(&self) -> u64

Source§

impl SortKey for u64

Source§

fn sort_key(&self) -> u64

Implementors§