brk_store 0.2.5

A thin wrapper around fjall
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use brk_error::Result;
use brk_types::{Height, Version};
use fjall::Keyspace;

pub trait AnyStore: Send + Sync {
    fn name(&self) -> &'static str;
    fn height(&self) -> Option<Height>;
    fn has(&self, height: Height) -> bool;
    fn needs(&self, height: Height) -> bool;
    fn version(&self) -> Version;
    fn export_meta(&mut self, height: Height) -> Result<()>;
    fn export_meta_if_needed(&mut self, height: Height) -> Result<()>;
    fn keyspace(&self) -> &Keyspace;
    fn commit(&mut self, height: Height) -> Result<()>;
    fn reset(&mut self) -> Result<()>;
}