pub struct LevelRoute {
pub levels: Range<u8>,
pub path: PathBuf,
pub fs: Arc<dyn Fs>,
}Expand description
Per-level filesystem routing entry for tiered storage.
Maps a range of LSM levels to a base directory and filesystem backend.
Tables at these levels are stored under path/tables/.
§Example
use lsm_tree::config::LevelRoute;
use lsm_tree::fs::StdFs;
use std::sync::Arc;
// Hot tier: L0-L1 on NVMe
let hot = LevelRoute {
levels: 0..2,
path: "/mnt/nvme/db".into(),
fs: Arc::new(StdFs),
};
// Cold tier: L4-L6 on HDD
let cold = LevelRoute {
levels: 4..7,
path: "/mnt/hdd/db".into(),
fs: Arc::new(StdFs),
};Fields§
§levels: Range<u8>LSM levels this route covers (e.g., 0..2 for L0–L1).
path: PathBufBase data directory for tables at these levels.
fs: Arc<dyn Fs>Filesystem backend for I/O at these levels.
Trait Implementations§
Source§impl Clone for LevelRoute
impl Clone for LevelRoute
Source§fn clone(&self) -> LevelRoute
fn clone(&self) -> LevelRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LevelRoute
impl !RefUnwindSafe for LevelRoute
impl Send for LevelRoute
impl Sync for LevelRoute
impl Unpin for LevelRoute
impl UnsafeUnpin for LevelRoute
impl !UnwindSafe for LevelRoute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more