pub struct StoreConfig {
pub root: PathBuf,
pub max_segment_bytes: u64,
pub sync_policy: SyncPolicy,
pub retention: RetentionPolicy,
pub keys: KeyRing,
pub plaintext_cache: bool,
pub anchor: Option<AnchorHook>,
pub access_log: bool,
pub access_retention: RetentionPolicy,
}Fields§
§root: PathBuf§max_segment_bytes: u64§sync_policy: SyncPolicy§retention: RetentionPolicy§keys: KeyRing§plaintext_cache: boolOpt-in for LIKE (crate::MatchMode::Contains) search on protected
fields: plaintexts of protected values written by this process are
held in memory (never persisted), and RSA values are decrypted and
cached per immutable version on first Contains search. Off by
default — keeping plaintexts of protected fields in memory is a
deliberate trade-off the operator must choose; when off, Contains on
protected fields is rejected (plain fields are always LIKE-searchable).
anchor: Option<AnchorHook>Called with each integrity checkpoint after it is persisted, so its chain head can be exported to an external trust domain (another host, a ticket, a transparency log) that a disk-level insider cannot rewrite. Errors and panics inside the hook are swallowed: availability of the write path outranks anchoring — export delivery is the hook’s job.
access_log: boolOpt-in meta-audit: record reads and admin actions against the audit
store itself in a dedicated access-log table (root/access/) — see
crate::access. Off by default.
access_retention: RetentionPolicyRetention for the access-log table, independent of the main retention
window. Access records are often kept shorter than the audit data
they describe; the split is possible because the access log lives in
its own table (retention drops whole segments per table).
Implementations§
Source§impl StoreConfig
impl StoreConfig
pub fn new(root: impl Into<PathBuf>) -> Self
Sourcepub fn access_log(self, enabled: bool) -> Self
pub fn access_log(self, enabled: bool) -> Self
Enable the meta-audit access log — see
access_log.
Sourcepub fn access_retention(self, r: RetentionPolicy) -> Self
pub fn access_retention(self, r: RetentionPolicy) -> Self
Retention window for the access-log table — see
access_retention.
Sourcepub fn anchor(self, hook: impl Fn(&Checkpoint) + Send + Sync + 'static) -> Self
pub fn anchor(self, hook: impl Fn(&Checkpoint) + Send + Sync + 'static) -> Self
Register the external-anchor hook — see anchor.
Sourcepub fn plaintext_cache(self, enabled: bool) -> Self
pub fn plaintext_cache(self, enabled: bool) -> Self
Enable the in-memory plaintext cache — see
plaintext_cache.
pub fn retention(self, r: RetentionPolicy) -> Self
pub fn sync_policy(self, p: SyncPolicy) -> Self
pub fn keys(self, k: KeyRing) -> Self
pub fn max_segment_bytes(self, n: u64) -> Self
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more