composable_indexes/core/
shallow_clone.rs

1/**
2 * A marker trait for types that support cloning without having to copy all indexed values.
3 * This likely means that either:
4 *
5 * - The type uses persistent data structures internally (e.g., `crate::index::im::BTreeIndex`)
6 * - The type only works using aggregations that do not store all samples (e.g., `crate::aggregation::CountIndex`)
7 */
8pub trait ShallowClone: Clone {
9    fn shallow_clone(&self) -> Self {
10        self.clone()
11    }
12}