pub struct ConfigCache { /* private fields */ }Expand description
Configuration caching wrapper
Implementations§
Source§impl ConfigCache
impl ConfigCache
Sourcepub fn get_config<T: DeserializeOwned + Serialize>(
&self,
path: &Path,
) -> Result<T, Box<dyn Error>>
pub fn get_config<T: DeserializeOwned + Serialize>( &self, path: &Path, ) -> Result<T, Box<dyn Error>>
Get cached configuration or load from file
Sourcepub fn invalidate_config(&self, path: &Path) -> Result<(), Box<dyn Error>>
pub fn invalidate_config(&self, path: &Path) -> Result<(), Box<dyn Error>>
Invalidate configuration cache
Sourcepub fn stats(&self) -> &CacheStats
pub fn stats(&self) -> &CacheStats
Get cache statistics
Auto Trait Implementations§
impl Freeze for ConfigCache
impl RefUnwindSafe for ConfigCache
impl Send for ConfigCache
impl Sync for ConfigCache
impl Unpin for ConfigCache
impl UnwindSafe for ConfigCache
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