pub struct GlobalConfig {
pub default: DefaultProfile,
pub connection: IndexMap<String, ConnectionProfile>,
pub history: HistoryConfig,
pub slow_log: SlowLogConfig,
pub cache: CacheConfig,
}Expand description
Global configuration + per-connection profiles.
Fields§
§default: DefaultProfile§connection: IndexMap<String, ConnectionProfile>§history: HistoryConfig§slow_log: SlowLogConfig§cache: CacheConfigImplementations§
Source§impl GlobalConfig
impl GlobalConfig
Sourcepub fn load(explicit_path: Option<&str>) -> Result<Self, ConfigError>
pub fn load(explicit_path: Option<&str>) -> Result<Self, ConfigError>
Load configuration using the standard discovery order:
- Explicit path (if provided)
./.ferrule.toml~/.config/ferrule/ferrule.toml(platform appropriate)
Sourcepub fn load_from(path: &Path) -> Result<Self, ConfigError>
pub fn load_from(path: &Path) -> Result<Self, ConfigError>
Load from a specific file path.
Sourcepub fn resolve_format(&self, cli: Option<&str>) -> String
pub fn resolve_format(&self, cli: Option<&str>) -> String
Resolve default output format, preferring explicit CLI value.
Trait Implementations§
Source§impl Clone for GlobalConfig
impl Clone for GlobalConfig
Source§fn clone(&self) -> GlobalConfig
fn clone(&self) -> GlobalConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GlobalConfig
impl Debug for GlobalConfig
Source§impl Default for GlobalConfig
impl Default for GlobalConfig
Source§fn default() -> GlobalConfig
fn default() -> GlobalConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GlobalConfig
impl<'de> Deserialize<'de> for GlobalConfig
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 GlobalConfig
impl RefUnwindSafe for GlobalConfig
impl Send for GlobalConfig
impl Sync for GlobalConfig
impl Unpin for GlobalConfig
impl UnsafeUnpin for GlobalConfig
impl UnwindSafe for GlobalConfig
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