[][src]Trait rdx::KeyBytes

pub trait KeyBytes<K> {
    const HAS_CONST_KEY_LEN: bool;
    const MAX_KEY_LEN: Option<usize>;

    fn key_len(&self, key: &K) -> usize;
fn key_byte(&self, key: &K, byte: usize) -> u8; fn has_const_key_len(&self) -> bool { ... }
fn max_key_len(&self) -> Option<usize> { ... } }

A trait to get the bytes of a radix sort key

Associated Constants

const HAS_CONST_KEY_LEN: bool

Get whether the key length for this type is always constant

const MAX_KEY_LEN: Option<usize>

Get the maximum key length for this type

Loading content...

Required methods

fn key_len(&self, key: &K) -> usize

The length of a given key

fn key_byte(&self, key: &K, byte: usize) -> u8

Get the nth byte of a given key. byte must be less than self.len(key)

Loading content...

Provided methods

fn has_const_key_len(&self) -> bool

Whether this key length is constant

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

The maximum key length

Loading content...

Implementations on Foreign Types

impl<'_, K, T> KeyBytes<K> for &'_ T where
    T: KeyBytes<K>, 
[src]

impl<'_, K, T> KeyBytes<K> for &'_ mut T where
    T: KeyBytes<K>, 
[src]

Loading content...

Implementors

impl<B, L, K> KeyBytes<K> for KeyBytesWith<B, L> where
    L: KeyLength<K>,
    B: Fn(&K, usize) -> u8
[src]

impl<B, S, K> KeyBytes<K> for RadixSortStrategyWith<B, S> where
    B: KeyBytes<K>, 
[src]

impl<F, T, K> KeyBytes<T> for KeyBytesOf<F> where
    K: RadixSortKey,
    F: Fn(&T) -> K, 
[src]

impl<F, T, K> KeyBytes<T> for KeyStrategy<F, T, K> where
    K: RadixSortKey,
    F: Fn(&T) -> K, 
[src]

impl<K: RadixSortKey> KeyBytes<K> for DefaultStrategy[src]

const HAS_CONST_KEY_LEN: bool[src]

Get whether the key length for this type is always constant

const MAX_KEY_LEN: Option<usize>[src]

Get the maximum key length for this type

fn has_const_key_len(&self) -> bool[src]

Whether this key length is constant

fn max_key_len(&self) -> Option<usize>[src]

The maximum key length

fn key_len(&self, key: &K) -> usize[src]

The length of a given key

fn key_byte(&self, key: &K, byte: usize) -> u8[src]

Get the nth byte of a given key. byte must be less than self.len(key)

Loading content...