Trait rusty_leveldb::Cmp
[−]
[src]
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; }
Comparator trait, supporting types that can be nested (i.e., add additional functionality on top of an inner comparator)
Required Methods
fn cmp(&self, a: &[u8], b: &[u8]) -> Ordering
Compare to byte strings, bytewise.
fn find_shortest_sep(&self, from: &[u8], to: &[u8]) -> Vec<u8>
Return the shortest byte string that compares "Greater" to the first argument and "Less" to the second one.
fn find_short_succ(&self, key: &[u8]) -> Vec<u8>
Return the shortest byte string that compares "Greater" to the argument.
fn id(&self) -> &'static str
A unique identifier for a comparator. A comparator wrapper (like InternalKeyCmp) may return the id of its inner comparator.
Implementors
impl Cmp for DefaultCmp