pub trait Cmp {
    fn cmp(&self, a: &[u8], b: &[u8]) -> Ordering;
    fn find_shortest_sep(&self, from: &[u8], to: &[u8]) -> Vec<u8>;
    fn find_short_succ(&self, key: &[u8]) -> Vec<u8>;
    fn id(&self) -> &'static str;
}
Expand description

Comparator trait, supporting types that can be nested (i.e., add additional functionality on top of an inner comparator)

Required Methods

Compare to byte strings, bytewise.

Return the shortest byte string that compares “Greater” to the first argument and “Less” to the second one.

Return the shortest byte string that compares “Greater” to the argument.

A unique identifier for a comparator. A comparator wrapper (like InternalKeyCmp) may return the id of its inner comparator.

Implementors