mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-22 04:18:50 -07:00
24 lines
452 B
Rust
24 lines
452 B
Rust
use brk_core::{Height, Result, Version};
|
|
|
|
pub trait AnyStore {
|
|
fn commit(&mut self, height: Height) -> Result<()>;
|
|
|
|
fn reset(&mut self) -> Result<()>;
|
|
|
|
fn rotate_memtable(&self);
|
|
|
|
fn height(&self) -> Option<Height>;
|
|
|
|
fn len(&self) -> usize;
|
|
|
|
fn is_empty(&self) -> bool {
|
|
self.len() == 0
|
|
}
|
|
|
|
fn has(&self, height: Height) -> bool;
|
|
|
|
fn needs(&self, height: Height) -> bool;
|
|
|
|
fn version(&self) -> Version;
|
|
}
|