pub struct CacheManager { /* private fields */ }Expand description
File-based cache manager.
Implementations§
Source§impl CacheManager
impl CacheManager
Sourcepub fn with_dir(cache_dir: PathBuf) -> Result<Self>
pub fn with_dir(cache_dir: PathBuf) -> Result<Self>
Create a cache manager with a custom directory.
Sourcepub fn with_default_ttl(self, ttl: Duration) -> Self
pub fn with_default_ttl(self, ttl: Duration) -> Self
Set the default TTL.
Auto Trait Implementations§
impl Freeze for CacheManager
impl RefUnwindSafe for CacheManager
impl Send for CacheManager
impl Sync for CacheManager
impl Unpin for CacheManager
impl UnsafeUnpin for CacheManager
impl UnwindSafe for CacheManager
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