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::{BlobTree, Tree};
6use enum_dispatch::enum_dispatch;
7
8/// May be a standard [`Tree`] or a [`BlobTree`]
9#[derive(Clone)]
10#[enum_dispatch(AbstractTree)]
11pub enum AnyTree {
12    /// Standard LSM-tree, see [`Tree`]
13    Standard(Tree),
14
15    /// Key-value separated LSM-tree, see [`BlobTree`]
16    Blob(BlobTree),
17}