pub struct ConfigManager { /* private fields */ }Expand description
Configuration manager
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn new(config: Arc<ControllerConfig>) -> Self
pub fn new(config: Arc<ControllerConfig>) -> Self
Create a new config manager
Sourcepub async fn set_config(&self, info: ConfigInfo) -> Result<()>
pub async fn set_config(&self, info: ConfigInfo) -> Result<()>
Set a configuration
Sourcepub async fn get_config(&self, key: &str) -> Result<ConfigInfo>
pub async fn get_config(&self, key: &str) -> Result<ConfigInfo>
Get a configuration
Sourcepub async fn delete_config(&self, key: &str) -> Result<()>
pub async fn delete_config(&self, key: &str) -> Result<()>
Delete a configuration
Sourcepub async fn list_configs(&self) -> Vec<ConfigInfo>
pub async fn list_configs(&self) -> Vec<ConfigInfo>
List all configurations
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<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