pub struct MemoryCache { /* private fields */ }Expand description
Thread-safe in-memory discovery cache.
Implementations§
Source§impl MemoryCache
impl MemoryCache
Sourcepub fn new(options: CacheOptions) -> Self
pub fn new(options: CacheOptions) -> Self
Create a new memory cache with the given options.
If mode is CacheMode::Disabled, get always returns None and put is a no-op.
Trait Implementations§
Source§impl Debug for MemoryCache
impl Debug for MemoryCache
Source§impl DiscoveryCache for MemoryCache
impl DiscoveryCache for MemoryCache
Auto Trait Implementations§
impl !Freeze for MemoryCache
impl RefUnwindSafe for MemoryCache
impl Send for MemoryCache
impl Sync for MemoryCache
impl Unpin for MemoryCache
impl UnsafeUnpin for MemoryCache
impl UnwindSafe for MemoryCache
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