pub struct ConfigStorage {
db: Arc<Database>,
}Fields§
§db: Arc<Database>Implementations§
Source§impl ConfigStorage
impl ConfigStorage
pub fn new(db: Arc<Database>) -> Result<Self>
Sourcepub fn get_config(&self) -> Result<Option<SystemConfig>>
pub fn get_config(&self) -> Result<Option<SystemConfig>>
Get system configuration
Sourcepub fn update_config(&self, config: SystemConfig) -> Result<()>
pub fn update_config(&self, config: SystemConfig) -> Result<()>
Update system configuration
Sourcepub fn get_worker_count(&self) -> Result<usize>
pub fn get_worker_count(&self) -> Result<usize>
Get a specific config value
Sourcepub fn set_worker_count(&self, count: usize) -> Result<()>
pub fn set_worker_count(&self, count: usize) -> Result<()>
Update worker count
Auto Trait Implementations§
impl Freeze for ConfigStorage
impl !RefUnwindSafe for ConfigStorage
impl Send for ConfigStorage
impl Sync for ConfigStorage
impl Unpin for ConfigStorage
impl !UnwindSafe for ConfigStorage
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