pub trait MonotonicallyMappableToU64: 'static + PartialOrd + Debug + Copy + Send + Sync {
    // Required methods
    fn to_u64(self) -> u64;
    fn from_u64(val: u64) -> Self;
}
Expand description

Monotonic maps a value to u64 value space. Monotonic mapping enables PartialOrd on u64 space without conversion to original space.

Required Methods§

source

fn to_u64(self) -> u64

Converts a value to u64.

Internally all fast field values are encoded as u64.

source

fn from_u64(val: u64) -> Self

Converts a value from u64

Internally all fast field values are encoded as u64. Note: To be used for converting encoded Term, Posting values.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MonotonicallyMappableToU64 for bool

source§

fn to_u64(self) -> u64

source§

fn from_u64(val: u64) -> Self

source§

impl MonotonicallyMappableToU64 for f64

source§

fn to_u64(self) -> u64

source§

fn from_u64(val: u64) -> Self

source§

impl MonotonicallyMappableToU64 for i64

source§

fn to_u64(self) -> u64

source§

fn from_u64(val: u64) -> Self

source§

impl MonotonicallyMappableToU64 for u64

source§

fn to_u64(self) -> u64

source§

fn from_u64(val: u64) -> Self

Implementors§