mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-14 04:28:11 -07:00
17 lines
643 B
Rust
17 lines
643 B
Rust
use brk_error::Result;
|
|
use brk_types::{Height, Version};
|
|
|
|
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_if_needed(&mut self, height: Height) -> Result<()>;
|
|
fn keyspace(&self) -> &fjall3::Keyspace;
|
|
fn partition(&self) -> &fjall2::PartitionHandle;
|
|
fn take_all_f2(&mut self) -> Vec<fjall2::InnerItem>;
|
|
fn take_all_f3(&mut self) -> Vec<fjall3::InnerItem>;
|
|
// fn take_all_f3(&mut self) -> Box<dyn Iterator<Item = Item>>;
|
|
}
|