pub struct ResolvedStorage {
pub default_namespace: String,
pub archive_on_gc: bool,
pub archive_max_days: Option<i64>,
pub max_memory_mb: Option<usize>,
pub db_mmap_size_bytes: i64,
pub default_namespace_source: ConfigSource,
pub source: ConfigSource,
}Expand description
Canonical resolved-storage configuration. Produced by
AppConfig::resolve_storage.
Fields§
§default_namespace: StringDefault namespace for new memories when the caller omits one.
archive_on_gc: boolWhether to archive memories before GC deletion.
archive_max_days: Option<i64>Archive retention ceiling in days (None = disabled).
max_memory_mb: Option<usize>Memory budget in MB for the auto tier selector.
db_mmap_size_bytes: i64#1579 B7 — resolved sqlite PRAGMA mmap_size in bytes
(AI_MEMORY_DB_MMAP_SIZE env > [storage].db_mmap_size_bytes
compiled 256 MiB default).
0disables memory-mapped I/O. Seeded intocrate::storage::set_db_mmap_sizeat boot.
default_namespace_source: ConfigSource#1590 — per-field provenance of default_namespace:
ConfigSource::Config when [storage].default_namespace is
explicitly set, ConfigSource::Legacy when only the
deprecated flat default_namespace field is set, else
ConfigSource::CompiledDefault. The section-level source
tag below cannot express this — it reports Config whenever a
[storage] section EXISTS even if default_namespace itself
was never configured, and the write-path defaulting must only
be overridden by an explicit operator choice (unconfigured
deployments keep the historical per-surface ladders).
source: ConfigSourceProvenance of the resolved configuration.
Implementations§
Source§impl ResolvedStorage
impl ResolvedStorage
Sourcepub fn explicit_default_namespace(&self) -> Option<&str>
pub fn explicit_default_namespace(&self) -> Option<&str>
#1590 — the operator-EXPLICITLY-configured default namespace,
or None when default_namespace merely bottomed out at the
compiled "global" default. Write-path consumers (MCP
memory_store, HTTP POST /api/v1/memories, the CLI
namespace ladder) only override their historical defaults when
this returns Some.
Trait Implementations§
Source§impl Clone for ResolvedStorage
impl Clone for ResolvedStorage
Source§fn clone(&self) -> ResolvedStorage
fn clone(&self) -> ResolvedStorage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedStorage
impl Debug for ResolvedStorage
impl Eq for ResolvedStorage
Source§impl PartialEq for ResolvedStorage
impl PartialEq for ResolvedStorage
Source§fn eq(&self, other: &ResolvedStorage) -> bool
fn eq(&self, other: &ResolvedStorage) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResolvedStorage
Auto Trait Implementations§
impl Freeze for ResolvedStorage
impl RefUnwindSafe for ResolvedStorage
impl Send for ResolvedStorage
impl Sync for ResolvedStorage
impl Unpin for ResolvedStorage
impl UnsafeUnpin for ResolvedStorage
impl UnwindSafe for ResolvedStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more