Weave documentation
Rust referenceweave-lens

weave-lens · config

Source declarations, signatures and documentation for config.

Reviewed implementation boundary: The current batching helper rejects multiple operations instead of implementing atomic batch commits. Cache/compaction/retention configuration fields do not establish running background compaction. See /libraries/lens/overview.

Source: sigil/weave/models/lens/src/config.rs. SHA-256: b25436b4b0df12fabf16a6a0a612947efb08d3c74d182ca9bdf596f788731977.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

config::LensConfig

Configuration for a Lens database

#[derive(Debug, Clone)]
pub struct LensConfig {
/// B-tree order (max children per node)

pub order: usize,
/// Maximum cache size in bytes

pub cache_size: usize,
/// Enable automatic compaction

pub auto_compact: bool,
/// Compaction threshold (% of wasted space)

pub compact_threshold: f64,
/// Snapshot retention period

pub snapshot_retention: Duration,
/// Enable write-ahead logging

pub enable_wal: bool,
/// Sync writes to disk

pub sync_writes: bool,
/// Maximum batch size

pub max_batch_size: usize
}

Source line: 7.

config::CompactionOptions

Options for compaction

#[derive(Debug, Clone)]
pub struct CompactionOptions {
/// Target fill factor for nodes

pub target_fill_factor: f64,
/// Merge small nodes

pub merge_small_nodes: bool,
/// Maximum nodes to process per batch

pub batch_size: usize
}

Source line: 50.

On this page