pub struct ConfigLoader;Expand description
OCI configuration file loader
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn load_from_env_var(
config_value: &str,
profile: Option<&str>,
) -> Result<LoadedConfig>
pub fn load_from_env_var( config_value: &str, profile: Option<&str>, ) -> Result<LoadedConfig>
Load configuration from OCI_CONFIG environment variable value
Automatically detects whether the value is a file path or INI content
§Arguments
config_value- Value from OCI_CONFIG environment variable (file path or INI content)profile- Profile name (default: “DEFAULT”)
Sourcepub fn load_from_ini_content(
ini_content: &str,
profile: Option<&str>,
) -> Result<LoadedConfig>
pub fn load_from_ini_content( ini_content: &str, profile: Option<&str>, ) -> Result<LoadedConfig>
Load configuration from INI content string
§Arguments
ini_content- INI format configuration stringprofile- Profile name (default: “DEFAULT”)
Sourcepub fn load_from_file(
path: &Path,
profile: Option<&str>,
) -> Result<LoadedConfig>
pub fn load_from_file( path: &Path, profile: Option<&str>, ) -> Result<LoadedConfig>
Load configuration from file path
§Arguments
path- Configuration file pathprofile- Profile name (default: “DEFAULT”)
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnwindSafe for ConfigLoader
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