pub trait Key: Copy + Sealed { }
Expand description
Types which can be used as sorting keys.
Implemented for all scalar types and their tuples.
Slices of types for which Key
is implemented can be sorted directly using
sort
. Slices of other types can be sorted using sort_by_key
with a
key extraction function.
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.