lsm_tree/any_tree.rs
1// Copyright (c) 2024-present, fjall-rs
2// This source code is licensed under both the Apache 2.0 and MIT License
3// (found in the LICENSE-* files in the repository)
4
5use crate::{
6 blob_tree::ingest::BlobIngestion, tree::ingest::Ingestion, BlobTree, SeqNo, Tree, UserKey,
7 UserValue,
8};
9use enum_dispatch::enum_dispatch;
10
11/// May be a standard [`Tree`] or a [`BlobTree`]
12#[derive(Clone)]
13#[enum_dispatch(AbstractTree)]
14pub enum AnyTree {
15 /// Standard LSM-tree, see [`Tree`]
16 Standard(Tree),
17
18 /// Key-value separated LSM-tree, see [`BlobTree`]
19 Blob(BlobTree),
20}