You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: iterator.rs
    path of file: ./repos/enigma-core/enigma-core/app/src/db
    
    the code of the file until where you have to start completion: use common_u::errors::{DBErr, DBErrKind};
use db::dal::{CRUDInterface, DB};
use db::primitives::{DeltaKey, SplitKey, Stype};
use enigma_types::ContractAddress;
use failure::Error;
use hex::{FromHex, ToHex};
use rocksdb::DB as rocks_db;
use rocksdb::{Direction, IteratorMode, ReadOptions, WriteBatch};

const DELTA_PREFIX: &[u8] = &[1];

type ResultVec<T> = Result<Vec<T>, Error>;
pub type ResultTypeVec<T> = Result<ResultType<Vec<T>>, Error>;

#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash)]
pub enum ResultType<T> {
    Full(T),
    Partial(T),
    None,
}

impl<T> ResultType<T> {
    pub fn unwrap(self) -> T {
        match self {
            ResultType::Partial(val) | ResultType::Full(val) => val,
            ResultType::None => panic!("called `ResultType::unwrap()` on a `None` value"),
        }
    }

    pub fn is_none(&self) -> bool {
        m
    
    fn test_insert_tuples() {
        let (mut db, _dir) = create_test_db();

        let data = vec![
            (DeltaKey { contract_address: [7u8; 32].into(), key_type: Stype::Delta(1) }, b"Enigma".as_ref()),
            (DeltaKey { contract_address: [7u8; 32].into(), key_type: Stype::Delta(2) }, b"to".as_ref()),
            (DeltaKey { contract_address: [7u8; 32].into(), key_type: Stype::Delta(3) }, b"da".as_ref()),
            (DeltaKey { contract_address: [6u8; 32].into(), key_type: Stype::Delta(4) }, b"moon".as_ref()),
            (DeltaKey { contract_address: [6u8; 32].into(), key_type: Stype::Delta(5) }, b"and".as_ref()),
            (DeltaKey { contract_address: [6u8; 32].into(), key_type: Stype::Delta(6) }, b"back".as_ref()),
        ];
        let results = db.insert_tuples(&data);
        for res in results {
            res.unwrap();
        }
        for (key, val) in data {
            assert_eq!((&db.read(&key).unwrap() as &[u8]), val);
        }
    }