pub trait Cmp: Sync + Send {
// Required methods
fn cmp(&self, _: &[u8], _: &[u8]) -> Ordering;
fn find_shortest_sep(&self, _: &[u8], _: &[u8]) -> Vec<u8>;
fn find_short_succ(&self, _: &[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§
sourcefn find_shortest_sep(&self, _: &[u8], _: &[u8]) -> Vec<u8>
fn find_shortest_sep(&self, _: &[u8], _: &[u8]) -> Vec<u8>
Return the shortest byte string that compares “Greater” to the first argument and “Less” to the second one.
sourcefn find_short_succ(&self, _: &[u8]) -> Vec<u8>
fn find_short_succ(&self, _: &[u8]) -> Vec<u8>
Return the shortest byte string that compares “Greater” to the argument.