pub struct BackendConfig {
pub name: String,
pub kind: BackendKind,
pub path: Option<PathBuf>,
pub cache_mb: Option<u32>,
pub journal_mode: Option<String>,
pub read_only: bool,
}Expand description
Configuration for a named storage backend.
Corresponds to a [[backends]] entry in khive.toml.
When no [[backends]] section is present, a single implicit main backend
is synthesised from the existing --db / KHIVE_DB / default-path resolution.
All packs fall back to main when their name is absent from [packs].
[[backends]]
name = "knowledge"
kind = "sqlite"
path = "~/.khive/knowledge.db"
cache_mb = 128
journal_mode = "wal"
read_only = falseFields§
§name: StringUnique backend name. Referenced by [packs.<name>].backend.
kind: BackendKindStorage backend kind. Defaults to sqlite.
path: Option<PathBuf>Filesystem path for sqlite kind. Tilde is expanded to $HOME.
None for memory kind (path is ignored when present).
cache_mb: Option<u32>SQLite page-cache size in MiB.
journal_mode: Option<String>SQLite journal mode (e.g. "wal").
read_only: boolOpen the backend read-only. Defaults to false.
Trait Implementations§
Source§impl Clone for BackendConfig
impl Clone for BackendConfig
Source§fn clone(&self) -> BackendConfig
fn clone(&self) -> BackendConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackendConfig
impl Debug for BackendConfig
Source§impl<'de> Deserialize<'de> for BackendConfig
impl<'de> Deserialize<'de> for BackendConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BackendConfig
impl RefUnwindSafe for BackendConfig
impl Send for BackendConfig
impl Sync for BackendConfig
impl Unpin for BackendConfig
impl UnsafeUnpin for BackendConfig
impl UnwindSafe for BackendConfig
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
Mutably borrows from an owned value. Read more