Trait heed_traits::Comparator
source · pub trait Comparator {
// Required method
fn compare(a: &[u8], b: &[u8]) -> Ordering;
}
Expand description
Define a custom key comparison function for a database.
The comparison function is called whenever it is necessary to compare a key specified by the application with a key currently stored in the database. If no comparison function is specified, and no special key flags were specified, the keys are compared lexically, with shorter keys collating before longer keys.
Required Methods§
Object Safety§
This trait is not object safe.