Trait exonum_leveldb::database::comparator::Comparator [] [src]

pub trait Comparator {
    fn name(&self) -> *const c_char;
fn compare(&self, a: &[u8], b: &[u8]) -> Ordering; fn null() -> bool { ... } }

A comparator has two important functions:

  • the name function returns a fixed name to detect errors when opening databases with a different name
  • The comparison implementation

Required Methods

Return the name of the Comparator

compare two keys. This must implement a total ordering.

Provided Methods

whether the comparator is the DefaultComparator

Implementors