pub trait RadixSortKey: Ord {
const DELEGATION_SIZE: usize = 128usize;
const HAS_CONST_KEY_LEN: bool = false;
const MAX_KEY_LEN: Option<usize> = None;
// Required methods
fn key_len(&self) -> usize;
fn key_byte(&self, byte: usize) -> u8;
// Provided methods
fn std_sort_size_threshold() -> usize { ... }
fn depth_threshold() -> usize { ... }
}
Expand description
A key which can be used for radix sorts
Provided Associated Constants§
Sourceconst DELEGATION_SIZE: usize = 128usize
const DELEGATION_SIZE: usize = 128usize
Get at what size to delegate this sort to another algorithm. This is a hint.
Sourceconst HAS_CONST_KEY_LEN: bool = false
const HAS_CONST_KEY_LEN: bool = false
Get whether the key length for this type is always constant
Sourceconst MAX_KEY_LEN: Option<usize> = None
const MAX_KEY_LEN: Option<usize> = None
Get the maximum key length for this type
Required Methods§
Provided Methods§
Sourcefn std_sort_size_threshold() -> usize
fn std_sort_size_threshold() -> usize
Size threshold to use std sort
Sourcefn depth_threshold() -> usize
fn depth_threshold() -> usize
Depth threshold to switch algorithm
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.