pub struct VectorConfig {Show 17 fields
pub db_path: PathBuf,
pub index_dir: PathBuf,
pub embedding_service_url: String,
pub default_dimensions: usize,
pub ef_construction: usize,
pub m_connections: usize,
pub ef_search: usize,
pub max_elements: usize,
pub cache_size: usize,
pub batch_size: usize,
pub embedding_timeout_ms: u64,
pub num_threads: usize,
pub default_workspace_id: String,
pub require_workspace_id: bool,
pub api_key_store_path: PathBuf,
pub rate_limit_rps: u32,
pub require_auth: bool,
}Expand description
Runtime configuration for the claw-vector engine.
Fields§
§db_path: PathBufPath to the SQLite database file for vector metadata.
index_dir: PathBufDirectory for HNSW index files and mmap vector files.
embedding_service_url: StringgRPC endpoint of the Python embedding service (e.g. "http://localhost:50051").
default_dimensions: usizeDefault embedding dimensionality (384 = all-MiniLM-L6-v2).
ef_construction: usizeHNSW ef_construction build parameter (higher → better recall, slower build).
m_connections: usizeHNSW M connections parameter (higher → better recall, more memory).
ef_search: usizeHNSW ef search parameter (higher → better recall, slower search).
max_elements: usizeMaximum number of vectors per index.
cache_size: usizeNumber of embedding LRU cache entries.
batch_size: usizeMaximum number of texts per embedding gRPC call.
embedding_timeout_ms: u64Timeout for embedding gRPC calls in milliseconds.
num_threads: usizeNumber of rayon threads for parallel index operations.
default_workspace_id: StringDefault workspace id used when callers do not provide one explicitly.
require_workspace_id: boolRequire callers to provide workspace ids explicitly.
api_key_store_path: PathBufSQLite path for API key storage.
rate_limit_rps: u32Default request budget per workspace in requests/second.
require_auth: boolRequire authentication for inbound API requests.
Implementations§
Source§impl VectorConfig
impl VectorConfig
Sourcepub fn builder() -> VectorConfigBuilder
pub fn builder() -> VectorConfigBuilder
Return a new builder initialised with the default configuration.
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load configuration from environment variables, falling back to defaults.
Recognised variables:
CLAW_VECTOR_DB_PATHCLAW_VECTOR_INDEX_DIRCLAW_EMBEDDING_URLCLAW_DEFAULT_WORKSPACE_IDCLAW_REQUIRE_WORKSPACE_IDCLAW_API_KEY_STORE_PATHCLAW_RATE_LIMIT_RPSCLAW_REQUIRE_AUTH
Trait Implementations§
Source§impl Clone for VectorConfig
impl Clone for VectorConfig
Source§fn clone(&self) -> VectorConfig
fn clone(&self) -> VectorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VectorConfig
impl Debug for VectorConfig
Source§impl Default for VectorConfig
impl Default for VectorConfig
Source§impl<'de> Deserialize<'de> for VectorConfig
impl<'de> Deserialize<'de> for VectorConfig
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 VectorConfig
impl RefUnwindSafe for VectorConfig
impl Send for VectorConfig
impl Sync for VectorConfig
impl Unpin for VectorConfig
impl UnsafeUnpin for VectorConfig
impl UnwindSafe for VectorConfig
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request