pub struct InMemoryCache { /* private fields */ }
Trait Implementations§
Source§impl CacheBackend for InMemoryCache
impl CacheBackend for InMemoryCache
Source§fn backend_type(&self) -> &'static str
fn backend_type(&self) -> &'static str
report the type of the cache backend
Source§fn get_random(&self) -> Option<CacheValue>
fn get_random(&self) -> Option<CacheValue>
Get a random image from the cache
Source§fn set(&mut self, key: CacheKey, image: CacheValue) -> Result<(), String>
fn set(&mut self, key: CacheKey, image: CacheValue) -> Result<(), String>
Store an image in the cache with its key Read more
Source§impl Debug for InMemoryCache
impl Debug for InMemoryCache
Auto Trait Implementations§
impl Freeze for InMemoryCache
impl RefUnwindSafe for InMemoryCache
impl Send for InMemoryCache
impl Sync for InMemoryCache
impl Unpin for InMemoryCache
impl UnwindSafe for InMemoryCache
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