pub struct Config {
pub server: ServerConfig,
pub models: ModelsConfig,
pub rerank: RerankConfig,
pub telemetry: TelemetryConfig,
pub cli: CliConfig,
}Expand description
The merged-and-resolved configuration handed to every CLI/MCP/server entrypoint.
Fields§
§server: ServerConfig[server] section.
models: ModelsConfig[models] section.
rerank: RerankConfig[rerank] section.
telemetry: TelemetryConfig[telemetry] section.
cli: CliConfig[cli] section — admin-visibility flag etc.
Implementations§
Source§impl Config
impl Config
Sourcepub fn discover(
explicit_path: Option<&Path>,
env: &impl ConfigEnv,
) -> Result<(Self, Option<PathBuf>), ConfigError>
pub fn discover( explicit_path: Option<&Path>, env: &impl ConfigEnv, ) -> Result<(Self, Option<PathBuf>), ConfigError>
Discover and load a config from --config (explicit_path), then the
MIDNIGHT_MANUAL_CONFIG env var, then the XDG location.
If no file is found, returns Config::default. Returns the loaded
config and the path the loader resolved (or None if defaulted).
§Errors
Returns ConfigError::Read if the file is unreadable, or
ConfigError::Parse if the TOML is malformed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.