pub struct SimpleConfigManager { /* private fields */ }Expand description
简化的配置管理器
Implementations§
Source§impl SimpleConfigManager
impl SimpleConfigManager
Sourcepub fn with_config(config: SimpleTranslationConfig) -> Self
pub fn with_config(config: SimpleTranslationConfig) -> Self
从配置创建
Sourcepub fn config(&self) -> &SimpleTranslationConfig
pub fn config(&self) -> &SimpleTranslationConfig
获取配置的引用
Sourcepub fn config_cloned(&self) -> SimpleTranslationConfig
pub fn config_cloned(&self) -> SimpleTranslationConfig
获取配置的克隆
Sourcepub fn update_config(&mut self, config: SimpleTranslationConfig)
pub fn update_config(&mut self, config: SimpleTranslationConfig)
更新配置
Sourcepub fn update_with_builder<F>(&mut self, f: F) -> Result<(), String>
pub fn update_with_builder<F>(&mut self, f: F) -> Result<(), String>
使用配置构建器更新
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimpleConfigManager
impl RefUnwindSafe for SimpleConfigManager
impl Send for SimpleConfigManager
impl Sync for SimpleConfigManager
impl Unpin for SimpleConfigManager
impl UnwindSafe for SimpleConfigManager
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