view src/types.rs @ 12:9c19b1c12b78

Add LdbIterator trait
author Lewin Bormann <lbo@spheniscida.de>
date Fri, 10 Jun 2016 21:14:43 +0200
parents 32cf15e42de1
children 15dbd6fd7221
line wrap: on
line source


pub enum ValueType {
    TypeDeletion = 0,
    TypeValue = 1,
}

pub type SequenceNumber = u64;

#[allow(dead_code)]
pub enum Status {
    OK,
    NotFound(String),
    Corruption(String),
    NotSupported(String),
    InvalidArgument(String),
    IOError(String),
}

pub trait LdbIterator<'a>: Iterator {
    fn seek(&mut self, key: &Vec<u8>);
    fn valid(&self) -> bool;
    fn current(&'a self) -> Self::Item;
}