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