pub struct FileConfigProvider { /* private fields */ }Expand description
File-based configuration provider.
Implementations§
Source§impl FileConfigProvider
impl FileConfigProvider
Sourcepub fn new(path: &str) -> Result<Self, ConfigError>
pub fn new(path: &str) -> Result<Self, ConfigError>
Create a new file-based configuration provider.
Trait Implementations§
Source§impl ConfigProvider for FileConfigProvider
impl ConfigProvider for FileConfigProvider
Auto Trait Implementations§
impl Freeze for FileConfigProvider
impl RefUnwindSafe for FileConfigProvider
impl Send for FileConfigProvider
impl Sync for FileConfigProvider
impl Unpin for FileConfigProvider
impl UnsafeUnpin for FileConfigProvider
impl UnwindSafe for FileConfigProvider
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> ConfigProviderExt for Twhere
T: ConfigProvider,
impl<T> ConfigProviderExt for Twhere
T: ConfigProvider,
Source§fn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>, ConfigError>
fn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>, ConfigError>
Get a configuration value by key and deserialize it to the specified type.