pub struct ConfigManager { /* private fields */ }Expand description
Comprehensive configuration manager for the auth framework
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn for_application(app_name: &str) -> Result<Self>
pub fn for_application(app_name: &str) -> Result<Self>
Create a configuration manager for a specific application
Sourcepub fn get_auth_settings(&self) -> Result<AuthFrameworkSettings>
pub fn get_auth_settings(&self) -> Result<AuthFrameworkSettings>
Get the auth framework settings
Sourcepub fn get_section<T>(&self, section: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
pub fn get_section<T>(&self, section: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
Get a specific configuration section
Sourcepub fn get<T>(&self, key: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
pub fn get<T>(&self, key: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
Get a configuration value by key
Sourcepub fn get_or_default<T>(&self, key: &str, default: T) -> Twhere
T: for<'de> Deserialize<'de>,
pub fn get_or_default<T>(&self, key: &str, default: T) -> Twhere
T: for<'de> Deserialize<'de>,
Get a configuration value with a default
Sourcepub fn get_keys_with_prefix(&self, _prefix: &str) -> Vec<String>
pub fn get_keys_with_prefix(&self, _prefix: &str) -> Vec<String>
Get all keys with a specific prefix
Sourcepub fn env_prefix(&self) -> &str
pub fn env_prefix(&self) -> &str
Get the environment prefix
Sourcepub fn section(&self, section: &str) -> Result<ConfigManager>
pub fn section(&self, section: &str) -> Result<ConfigManager>
Create a nested configuration manager for a subsection
Sourcepub fn merge(self, other: ConfigManager) -> Result<ConfigManager>
pub fn merge(self, other: ConfigManager) -> Result<ConfigManager>
Merge with another configuration (other takes precedence)
Sourcepub fn export_to_string(&self, format: FileFormat) -> Result<String>
pub fn export_to_string(&self, format: FileFormat) -> Result<String>
Export the current configuration to a specific format
Trait Implementations§
Source§impl Clone for ConfigManager
impl Clone for ConfigManager
Source§fn clone(&self) -> ConfigManager
fn clone(&self) -> ConfigManager
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 ConfigManager
impl Debug for ConfigManager
Auto Trait Implementations§
impl Freeze for ConfigManager
impl !RefUnwindSafe for ConfigManager
impl Send for ConfigManager
impl Sync for ConfigManager
impl Unpin for ConfigManager
impl !UnwindSafe for ConfigManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more