pub struct SeekrConfig {
pub index_dir: PathBuf,
pub model_dir: PathBuf,
pub embed_model: String,
pub exclude_patterns: Vec<String>,
pub max_file_size: u64,
pub server: ServerConfig,
pub search: SearchConfig,
pub embedding: EmbeddingConfig,
}Expand description
Main configuration structure for Seekr.
Fields§
§index_dir: PathBufDirectory for storing index files.
Default: ~/.seekr/indexes/
model_dir: PathBufDirectory for storing downloaded ONNX models.
Default: ~/.seekr/models/
embed_model: StringEmbedding model name. Default: “all-MiniLM-L6-v2”
exclude_patterns: Vec<String>File glob patterns to exclude from scanning.
max_file_size: u64Maximum file size (in bytes) to index.
server: ServerConfigServer configuration.
search: SearchConfigSearch configuration.
embedding: EmbeddingConfigEmbedding configuration.
Implementations§
Source§impl SeekrConfig
impl SeekrConfig
Sourcepub fn load() -> Result<Self, ConfigError>
pub fn load() -> Result<Self, ConfigError>
Load configuration from the default config file path.
If the config file does not exist, returns default configuration and creates the default config file.
Sourcepub fn load_from(path: &Path) -> Result<Self, ConfigError>
pub fn load_from(path: &Path) -> Result<Self, ConfigError>
Load configuration from a specific file path.
Sourcepub fn save_to(&self, path: &Path) -> Result<(), ConfigError>
pub fn save_to(&self, path: &Path) -> Result<(), ConfigError>
Save configuration to a specific file path.
Sourcepub fn project_index_dir(&self, project_path: &Path) -> PathBuf
pub fn project_index_dir(&self, project_path: &Path) -> PathBuf
Get the index directory for a specific project path.
Each project gets its own isolated index directory based on a blake3 hash of the canonical project path.
Trait Implementations§
Source§impl Clone for SeekrConfig
impl Clone for SeekrConfig
Source§fn clone(&self) -> SeekrConfig
fn clone(&self) -> SeekrConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SeekrConfig
impl Debug for SeekrConfig
Source§impl Default for SeekrConfig
impl Default for SeekrConfig
Source§impl<'de> Deserialize<'de> for SeekrConfigwhere
SeekrConfig: Default,
impl<'de> Deserialize<'de> for SeekrConfigwhere
SeekrConfig: 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>,
Auto Trait Implementations§
impl Freeze for SeekrConfig
impl RefUnwindSafe for SeekrConfig
impl Send for SeekrConfig
impl Sync for SeekrConfig
impl Unpin for SeekrConfig
impl UnsafeUnpin for SeekrConfig
impl UnwindSafe for SeekrConfig
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<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