Files
brk/crates/brk_store/src/any.rs
T
2026-01-20 15:04:00 +01:00

17 lines
577 B
Rust

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