pub struct TomlConfigManager { /* private fields */ }Implementations§
Trait Implementations§
Source§impl ConfigManager for TomlConfigManager
impl ConfigManager for TomlConfigManager
Source§fn load_config<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_config<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
加载配置文件
Source§fn save_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_config: &'life1 Config,
_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_config: &'life1 Config,
_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
保存配置文件
Source§fn update_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 DependencySpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 DependencySpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
更新依赖配置
Source§fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValidation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValidation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
验证配置文件
Source§fn get_project_root(&self) -> &Path
fn get_project_root(&self) -> &Path
获取项目根目录
Source§fn backup_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn backup_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
备份当前配置
Source§fn restore_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
恢复配置备份
Source§fn remove_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
删除配置备份
Auto Trait Implementations§
impl Freeze for TomlConfigManager
impl RefUnwindSafe for TomlConfigManager
impl Send for TomlConfigManager
impl Sync for TomlConfigManager
impl Unpin for TomlConfigManager
impl UnwindSafe for TomlConfigManager
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> 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