pub struct StorageSection {
pub default_namespace: Option<String>,
pub archive_on_gc: Option<bool>,
pub archive_max_days: Option<i64>,
pub max_memory_mb: Option<usize>,
pub db_mmap_size_bytes: Option<i64>,
}Expand description
v0.7.x (#1146) — [storage] sectioned storage configuration.
Wire format:
[storage]
default_namespace = "alphaone"
archive_on_gc = true
archive_max_days = 90
max_memory_mb = 4096Carries the previously-flat top-level fields default_namespace,
archive_on_gc, archive_max_days, max_memory_mb. The db
path stays top-level per the #1146 I4 carve-out (path expansion
semantics pinned by #507).
Fields§
§default_namespace: Option<String>Default namespace for new memories when the caller’s request
omits one. Folded from the previously-flat top-level
default_namespace field.
archive_on_gc: Option<bool>Whether to archive memories before GC deletion. Folded from
archive_on_gc. Default true.
archive_max_days: Option<i64>Archive retention ceiling in days. None (default) disables
the automatic purge. Folded from archive_max_days.
max_memory_mb: Option<usize>Memory budget in MB for the auto tier selector. Folded from
max_memory_mb.
db_mmap_size_bytes: Option<i64>#1579 B7 — sqlite PRAGMA mmap_size in bytes. 0 disables
memory-mapped I/O (stock SQLite semantics); negative values are
treated as unset and fall through the ladder. Env override:
AI_MEMORY_DB_MMAP_SIZE (see ENV_DB_MMAP_SIZE). Compiled
default: 256 MiB
(crate::storage::DEFAULT_DB_MMAP_SIZE_BYTES) — the only
across-the-board winner of the P1 perf-audit PRAGMA A/B
(15-30% on large-corpus reads).
Trait Implementations§
Source§impl Clone for StorageSection
impl Clone for StorageSection
Source§fn clone(&self) -> StorageSection
fn clone(&self) -> StorageSection
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 StorageSection
impl Debug for StorageSection
Source§impl Default for StorageSection
impl Default for StorageSection
Source§fn default() -> StorageSection
fn default() -> StorageSection
Source§impl<'de> Deserialize<'de> for StorageSection
impl<'de> Deserialize<'de> for StorageSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StorageSection
Source§impl PartialEq for StorageSection
impl PartialEq for StorageSection
Source§fn eq(&self, other: &StorageSection) -> bool
fn eq(&self, other: &StorageSection) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StorageSection
impl Serialize for StorageSection
impl StructuralPartialEq for StorageSection
Auto Trait Implementations§
impl Freeze for StorageSection
impl RefUnwindSafe for StorageSection
impl Send for StorageSection
impl Sync for StorageSection
impl Unpin for StorageSection
impl UnsafeUnpin for StorageSection
impl UnwindSafe for StorageSection
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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