pub struct QailConfig {
pub project: ProjectConfig,
pub postgres: PostgresConfig,
pub redis: Option<RedisConfig>,
pub qdrant: Option<QdrantConfig>,
pub gateway: Option<GatewayConfig>,
pub sync: Vec<SyncRule>,
}Expand description
Root config — deserialized from qail.toml.
All sections are optional for backward compatibility.
Fields§
§project: ProjectConfig§postgres: PostgresConfig§redis: Option<RedisConfig>§qdrant: Option<QdrantConfig>§gateway: Option<GatewayConfig>§sync: Vec<SyncRule>Implementations§
Source§impl QailConfig
impl QailConfig
Sourcepub fn load() -> ConfigResult<Self>
pub fn load() -> ConfigResult<Self>
Load config from ./qail.toml in the current directory.
Sourcepub fn load_from(path: impl AsRef<Path>) -> ConfigResult<Self>
pub fn load_from(path: impl AsRef<Path>) -> ConfigResult<Self>
Load config from a specific file path.
Sourcepub fn postgres_url(&self) -> &str
pub fn postgres_url(&self) -> &str
Convenience: get the resolved PostgreSQL URL.
Trait Implementations§
Source§impl Clone for QailConfig
impl Clone for QailConfig
Source§fn clone(&self) -> QailConfig
fn clone(&self) -> QailConfig
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 QailConfig
impl Debug for QailConfig
Source§impl Default for QailConfig
impl Default for QailConfig
Source§fn default() -> QailConfig
fn default() -> QailConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QailConfig
impl<'de> Deserialize<'de> for QailConfig
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 QailConfig
impl RefUnwindSafe for QailConfig
impl Send for QailConfig
impl Sync for QailConfig
impl Unpin for QailConfig
impl UnwindSafe for QailConfig
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