pub struct ConfigLoaderBuilder { /* private fields */ }Expand description
Configuration loader builder 配置加载器构建器
Provides a fluent API for building a ConfigLoader.
为构建ConfigLoader提供流畅的API。
Implementations§
Source§impl ConfigLoaderBuilder
impl ConfigLoaderBuilder
Sourcepub fn search_path(self, path: impl Into<PathBuf>) -> Self
pub fn search_path(self, path: impl Into<PathBuf>) -> Self
Add a search path 添加搜索路径
Sourcepub fn search_paths(self, paths: Vec<PathBuf>) -> Self
pub fn search_paths(self, paths: Vec<PathBuf>) -> Self
Add multiple search paths 添加多个搜索路径
Sourcepub fn file_names(self, names: Vec<String>) -> Self
pub fn file_names(self, names: Vec<String>) -> Self
Add multiple file names 添加多个文件名
Sourcepub fn load_env(self, load: bool) -> Self
pub fn load_env(self, load: bool) -> Self
Enable/disable environment variable loading 启用/禁用环境变量加载
Sourcepub fn load_args(self, load: bool) -> Self
pub fn load_args(self, load: bool) -> Self
Enable/disable command line argument loading 启用/禁用命令行参数加载
Sourcepub fn build(self) -> ConfigLoader
pub fn build(self) -> ConfigLoader
Build the loader 构建加载器
Sourcepub fn load(self) -> ConfigResult<Config>
pub fn load(self) -> ConfigResult<Config>
Build and load configuration 构建并加载配置
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigLoaderBuilder
impl RefUnwindSafe for ConfigLoaderBuilder
impl Send for ConfigLoaderBuilder
impl Sync for ConfigLoaderBuilder
impl Unpin for ConfigLoaderBuilder
impl UnsafeUnpin for ConfigLoaderBuilder
impl UnwindSafe for ConfigLoaderBuilder
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