coordinode-lsm-tree 5.8.1

Embedded LSM-tree storage engine in pure Rust, no C/C++ dependency. MVCC snapshots, BuRR filters, zstd dictionary compression, columnar PAX blocks, AES-256-GCM at rest, self-healing per-block ECC, compaction on a near-full disk, no_std support.
Documentation
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-present, fjall-rs
// Copyright (c) 2026-present, Structured World Foundation

pub trait GrowingWindowsExt<T> {
    fn growing_windows<'a>(&'a self) -> impl Iterator<Item = &'a [T]>
    where
        T: 'a;
}

impl<T> GrowingWindowsExt<T> for [T] {
    fn growing_windows<'a>(&'a self) -> impl Iterator<Item = &'a [T]>
    where
        T: 'a,
    {
        (1..=self.len()).flat_map(|size| self.windows(size))
    }
}

pub trait ShrinkingWindowsExt<T> {
    fn shrinking_windows<'a>(&'a self) -> impl Iterator<Item = &'a [T]>
    where
        T: 'a;
}

impl<T> ShrinkingWindowsExt<T> for [T] {
    fn shrinking_windows<'a>(&'a self) -> impl Iterator<Item = &'a [T]>
    where
        T: 'a,
    {
        (1..=self.len()).rev().flat_map(|size| self.windows(size))
    }
}

#[cfg(test)]
mod tests;