pub struct CodememConfig {
pub scoring: ScoringWeights,
pub vector: VectorConfig,
pub graph: GraphConfig,
pub embedding: EmbeddingConfig,
pub storage: StorageConfig,
pub chunking: ChunkingConfig,
pub enrichment: EnrichmentConfig,
}Expand description
Top-level Codemem configuration.
Fields§
§scoring: ScoringWeights§vector: VectorConfig§graph: GraphConfig§embedding: EmbeddingConfig§storage: StorageConfig§chunking: ChunkingConfig§enrichment: EnrichmentConfigImplementations§
Source§impl CodememConfig
impl CodememConfig
Sourcepub fn load(path: &Path) -> Result<Self, CodememError>
pub fn load(path: &Path) -> Result<Self, CodememError>
Load configuration from the given path. Validates after loading.
Sourcepub fn validate(&self) -> Result<(), CodememError>
pub fn validate(&self) -> Result<(), CodememError>
Validate configuration values.
Checks that scoring weights are non-negative, dimensions and cache sizes are positive, chunk size bounds are consistent, and dedup threshold is in the valid range.
Sourcepub fn save(&self, path: &Path) -> Result<(), CodememError>
pub fn save(&self, path: &Path) -> Result<(), CodememError>
Save configuration to the given path. Validates before saving.
Sourcepub fn load_or_default() -> Self
pub fn load_or_default() -> Self
Load from the default path, or return defaults if the file doesn’t exist.
Sourcepub fn default_path() -> PathBuf
pub fn default_path() -> PathBuf
Default config path: ~/.codemem/config.toml.
Trait Implementations§
Source§impl Clone for CodememConfig
impl Clone for CodememConfig
Source§fn clone(&self) -> CodememConfig
fn clone(&self) -> CodememConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 CodememConfig
impl Debug for CodememConfig
Source§impl Default for CodememConfig
impl Default for CodememConfig
Source§fn default() -> CodememConfig
fn default() -> CodememConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodememConfigwhere
CodememConfig: Default,
impl<'de> Deserialize<'de> for CodememConfigwhere
CodememConfig: Default,
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 CodememConfig
impl RefUnwindSafe for CodememConfig
impl Send for CodememConfig
impl Sync for CodememConfig
impl Unpin for CodememConfig
impl UnsafeUnpin for CodememConfig
impl UnwindSafe for CodememConfig
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