Weave documentation
Rust referencestrand-vault

strand-vault · config

Source declarations, signatures and documentation for config.

Reviewed implementation boundary: Vault construction does not automatically replay WAL entries. Snapshotting is a best-effort directory copy; replication mode/live settings are not implemented as runtime controls, and the capability preamble is not ACT authorization verification. See /libraries/strand-vault/overview.

Source: sigil/weave/libs/strand-vault/src/config.rs. SHA-256: 1515f5756474323ef192435a717baab16e12ba90cb7cad431dd253b064329c38.

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::VaultConfig

Vault configuration

#[derive(Clone)]
pub struct VaultConfig {
/// Storage factory

pub storage_factory: Box<dyn StorageFactory>,
/// Optional namespace

pub namespace: Option<String>,
/// Default to sparse mode

pub sparse_by_default: bool,
/// Cache size limit (number of strands)

pub cache_size: usize,
/// Auto-close timeout for inactive strands

pub inactive_timeout: Option<Duration>,
/// Enable strand compression

pub compression: bool,
/// Enable encryption for all strands

pub encryption: bool,
/// Allow public read access to strands

pub allow_public_read: bool,
/// Storage pool maximum open strands

pub pool_max_open: usize,
/// Storage pool idle TTL seconds

pub pool_idle_ttl_secs: u64,
/// Quotas and backpressure

pub quotas: QuotaConfig,
/// Optional write-ahead-log directory for recovery

pub wal_dir: Option<String>,
/// Optional indexing configuration

pub indexing: Option<IndexingConfig>
}

Source line: 9.

config::QuotaConfig

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct QuotaConfig {
pub namespace_max_bytes: Option<u64>,
pub namespace_max_strands: Option<usize>,
pub storage_headroom_bytes: Option<u64>,
pub io_queue_bound: usize,
pub replication_queue_bound: usize
}

Source line: 51.

config::IndexingConfig

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct IndexingConfig {
pub mode: IndexingMode,
pub background: bool,
pub workers: usize
}

Source line: 60.

config::IndexingMode

#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum IndexingMode {
    Unindexed,
    Key,
    KeyValue,
}

Source line: 67.

config::VaultConfig::validate

pub fn validate(&self) -> Result<(), crate::error::VaultError>;

Source line: 102.

config::CreateOptions

Options for creating a new strand

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateOptions {
/// Reserved for future custom keypair injection (not used in core)

#[serde(skip_serializing, skip_deserializing)]
pub keypair: Option<()>,
/// Custom name for the strand

pub name: Option<String>,
/// Enable sparse mode

pub sparse: Option<bool>,
/// Enable encryption

pub encrypted: Option<bool>,
/// Value encoding (e.g., "binary", "utf-8", "json")

pub value_encoding: Option<String>,
/// Initial metadata

pub metadata: Option<serde_json::Value>
}

Source line: 124.

config::CreateOptions::named

Create options with a specific name

pub fn named(name: impl Into<String>) -> Self;

Source line: 147.

config::CreateOptions::sparse

Create options with sparse mode

pub fn sparse() -> Self;

Source line: 155.

config::CreateOptions::encrypted

Create options with encryption

pub fn encrypted() -> Self;

Source line: 163.

On this page