[][src]Trait rdx::KeyLength

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

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

    fn has_const_key_len(&self) -> bool { ... }
fn max_key_len(&self) -> Option<usize> { ... } }

A radix sort key length function

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 at compile time, if any

Loading content...

Required methods

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

The length of a given 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> KeyLength<K> for usize[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 at compile time, if any

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

Loading content...

Implementors

impl<K, F> KeyLength<K> for F where
    F: Fn(&K) -> usize
[src]

Loading content...