weave-lens · snapshot
Source declarations, signatures and documentation for snapshot.
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/snapshot.rs. SHA-256: f1aa54c8b1992f07a64ee4359af47cf909f50ba8a8d21ff5cdad59b9ff956a57.
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.
snapshot::SnapshotId
Unique identifier for a snapshot
pub type SnapshotId = Uuid;Source line: 6.
snapshot::Snapshot
A point-in-time snapshot of the database
#[derive(Debug, Clone)]
pub struct Snapshot {
/// Unique identifier
pub id: SnapshotId,
/// Root block index at snapshot time
pub root_index: Option<u64>,
/// Strand length at snapshot time
pub strand_length: u64,
/// Creation timestamp
pub created_at: std::time::SystemTime,
/// Optional name
pub name: Option<String>,
/// Metadata
pub metadata: SnapshotMetadata
}Source line: 10.
snapshot::SnapshotMetadata
Metadata for a snapshot
#[derive(Debug, Clone, Default)]
pub struct SnapshotMetadata {
/// Number of entries
pub entries: u64,
/// Total size in bytes
pub size_bytes: u64,
/// Tree depth
pub depth: u32
}Source line: 32.
snapshot::Snapshot::new
Create a new snapshot
pub fn new(root_index: Option<u64>, strand_length: u64, metadata: SnapshotMetadata) -> Self;Source line: 45.
snapshot::Snapshot::with_name
Create a named snapshot
pub fn with_name(mut self, name: String) -> Self;Source line: 57.
snapshot::Snapshot::is_valid_at
Check if snapshot is valid at given strand length
pub fn is_valid_at(&self, current_length: u64) -> bool;Source line: 63.