pub enum OptionalCache {
Memory(MemoryCache),
Disabled,
}Expand description
Optional cache wrapper for graceful degradation
Variants§
Memory(MemoryCache)
Disabled
Implementations§
Source§impl OptionalCache
impl OptionalCache
Sourcepub fn memory(config: CacheConfig) -> Self
pub fn memory(config: CacheConfig) -> Self
Create a memory cache
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if cache is enabled
Auto Trait Implementations§
impl !Freeze for OptionalCache
impl !RefUnwindSafe for OptionalCache
impl Send for OptionalCache
impl Sync for OptionalCache
impl Unpin for OptionalCache
impl UnsafeUnpin for OptionalCache
impl UnwindSafe for OptionalCache
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