1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pub mod errors;
pub mod mem;
pub mod store;
pub mod uuid;
pub use crate::{
errors::DbError,
store::{ Package, Packet, PacketMetaData, Store, GetOptions},
mem::{ MemStore, open },
uuid::Uuid
};
pub trait Keeper {
fn add(&mut self, package: &Package) -> Result<(), DbError>;
fn get(&mut self, uuid: &Uuid) -> Result<Option<String>, DbError>;
fn del(&mut self, uuid: &Uuid) -> Result<(), DbError>;
fn fetch(&mut self) -> Result<Vec<PacketMetaData>, DbError>;
}