pub trait BTreeKey: Copy {
type Int: BTreeInteger;
// Required methods
fn to_int(self) -> Self::Int;
fn from_int(int: Self::Int) -> Self;
}Expand description
Trait which must be implemented for all keys inserted into a BTree.
BTree requires that keys be integers and reserves the maximum integer
value for internal use. This trait is already implementated for all integers
from the nonmax crate, but this crate allows for custom key types that
are convertible to/from an integer.
Note that keys in the BTree are ordered by their integer value and not
the Ord implementation of the key type.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".