Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 15 fields pub memory_file_path: String, pub transport: Transport, pub bind_addr: String, pub durability: Durability, pub auth_token: Option<Arc<str>>, pub mmap_size: i64, pub page_size: i64, pub cache_size_kb: i64, pub busy_timeout_ms: u64, pub wal_flush_ms: u64, pub lru_cache_size: usize, pub read_pool_size: usize, pub tls_cert: Option<PathBuf>, pub tls_key: Option<PathBuf>, pub vectors_enabled: bool,
}

Fields§

§memory_file_path: String§transport: Transport§bind_addr: String§durability: Durability§auth_token: Option<Arc<str>>

Optional bearer token required on the tcp and http transports. When None, those transports accept unauthenticated connections (stdio is always local and never authenticated).

§mmap_size: i64§page_size: i64

PRAGMA page_size in bytes (fresh DB only).

§cache_size_kb: i64

PRAGMA cache_size magnitude in KiB.

§busy_timeout_ms: u64

PRAGMA busy_timeout in milliseconds.

§wal_flush_ms: u64

Interval in milliseconds for the background wal_checkpoint(PASSIVE) flush. 0 disables it (rely on SQLite auto-checkpoint + maintenance).

§lru_cache_size: usize§read_pool_size: usize

Size of the read-only connection pool (concurrent reads). Always >= 1.

§tls_cert: Option<PathBuf>

PEM certificate chain for serving the http transport over TLS (HTTPS). None (the default) keeps the transport plaintext. Engaged only when both tls_cert and tls_key are set.

§tls_key: Option<PathBuf>

PEM private key matching tls_cert.

§vectors_enabled: bool

Enable the vector / semantic-search subsystem (vector_* + hybrid_search tools backed by a usearch HNSW index). Off by default.

Implementations§

Source§

impl Config

Source

pub fn sqlite_tuning(&self) -> SqliteTuning

Build the SQLite pragma tuning from this config, keeping the fixed journal_size_limit default.

Source

pub fn from_args(args: &Args) -> Result<Self>

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more