Files
brk/crates/brk_store/src/trait.rs
T
2025-06-29 17:39:31 +02:00

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;
}