weave-lens · utils
Source declarations, signatures and documentation for utils.
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/utils.rs. SHA-256: ed4ec370a8944c72e8c20eb243ff12d809e3fcd3bf13115e9e71414dcd14fa72.
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.
utils::encode_key
Encode a key for consistent hashing and lexicographic ordering
pub fn encode_key(key: &[u8]) -> Vec<u8>;Source line: 7.
utils::_hash_key
Hash a key for quick lookups
pub fn _hash_key(key: &[u8]) -> u64;Source line: 30.
utils::_compare_keys
Compare two keys
pub fn _compare_keys(a: &[u8], b: &[u8]) -> std::cmp::Ordering;Source line: 37.
utils::_key_in_range
Check if a key is within range
pub fn _key_in_range(
key: &[u8],
start: Option<&[u8]>,
end: Option<&[u8]>,
include_start: bool,
include_end: bool,
) -> bool;Source line: 42.
utils::_estimate_node_size
Estimate size of a node in bytes
pub fn _estimate_node_size(node: &crate::Node) -> usize;Source line: 71.