pub enum ConfigSource {
TomlFile(String),
YamlFile(String),
PropertiesFile(String),
ConfigFile(String),
Environment,
CommandLine,
Properties(HashMap<String, String>),
}Expand description
Configuration source types
ConfigSource represents different sources from which configuration
can be loaded, supporting various formats and locations.
Variants§
TomlFile(String)
Configuration from a TOML file
YamlFile(String)
Configuration from a YAML file
PropertiesFile(String)
Configuration from a Properties file
ConfigFile(String)
Configuration from any file (auto-detect format)
Environment
Configuration from environment variables
CommandLine
Configuration from command line arguments
Properties(HashMap<String, String>)
In-memory configuration properties
Trait Implementations§
Source§impl Clone for ConfigSource
impl Clone for ConfigSource
Source§fn clone(&self) -> ConfigSource
fn clone(&self) -> ConfigSource
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 ConfigSource
impl Debug for ConfigSource
Source§impl<'de> Deserialize<'de> for ConfigSource
impl<'de> Deserialize<'de> for ConfigSource
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 ConfigSource
impl RefUnwindSafe for ConfigSource
impl Send for ConfigSource
impl Sync for ConfigSource
impl Unpin for ConfigSource
impl UnsafeUnpin for ConfigSource
impl UnwindSafe for ConfigSource
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