mod common;
mod event_tree;
mod path_hash;
pub mod snapshot;
mod string_tree;
mod token_tree;
pub use common::{MatchResult, TenantId};
pub use event_tree::{
compute_content_hash, compute_request_content_hashes, ApplyError, ContentHash, OverlapScores,
PositionalIndexer, SequenceHash, StoredBlock, WorkerBlockMap, WorkerId,
};
pub use path_hash::{hash_node_path, hash_token_path, GLOBAL_EVICTION_HASH};
pub use string_tree::Tree;
pub use string_tree::{
PrefixMatchResult as StringMatchResult, PrefixMatchResult, Tree as StringTree,
};
pub use token_tree::{PrefixMatchResult as TokenMatchResult, TokenTree};
pub trait RadixTree: Send + Sync {
type Key: ?Sized;
type MatchResult: MatchResult;
fn insert(&self, key: &Self::Key, tenant: &str);
fn prefix_match(&self, key: &Self::Key) -> Option<TenantId>;
fn prefix_match_with_counts(&self, key: &Self::Key) -> Self::MatchResult;
fn evict(&self, tenant: &TenantId, max_units: usize);
fn tenant_size(&self, tenant: &TenantId) -> usize;
fn reset(&self);
}