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

pub trait Comparator {
    type K: Key;
    fn name(&self) -> *const c_char;
fn compare(&self, a: &Self::K, b: &Self::K) -> Ordering; fn null() -> bool { ... } }

A comparator has two important functions:

Associated Types

type K: Key

The type that the comparator compares.

Loading content...

Required methods

fn name(&self) -> *const c_char

Return the name of the Comparator

fn compare(&self, a: &Self::K, b: &Self::K) -> Ordering

compare two keys. This must implement a total ordering.

Loading content...

Provided methods

fn null() -> bool

whether the comparator is the DefaultComparator

Loading content...

Implementors

impl Comparator for DefaultComparator[src]

type K = i32

impl<K: Key + Ord> Comparator for OrdComparator<K>[src]

type K = K

Loading content...