pub trait Key:
Copy
+ Send
+ Sync
+ Eq
+ Ord
+ Hash {
// Required methods
fn key(self) -> i64;
fn from_key(key: i64) -> Option<Self>;
fn range(x: &[Self]) -> (i64, i64);
}Expand description
An item as a whole number: a Boolean’s 0 or 1, an integer, a character’s code point, or an order key. Two items match exactly when their keys are equal. A 64-bit unsigned key wraps to a negative number, which keeps keys distinct.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".