pub struct ThreadSafeCache { /* private fields */ }Expand description
Thread-safe wrapper for TraversalAwareCache.
Implementations§
Source§impl ThreadSafeCache
impl ThreadSafeCache
Sourcepub fn insert(&self, key: CacheKey, cluster: Arc<EdgeCluster>)
pub fn insert(&self, key: CacheKey, cluster: Arc<EdgeCluster>)
Insert a cluster into the cache.
Sourcepub fn remove(&self, key: &CacheKey) -> Option<Arc<EdgeCluster>>
pub fn remove(&self, key: &CacheKey) -> Option<Arc<EdgeCluster>>
Remove a cluster from the cache.
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThreadSafeCache
impl !RefUnwindSafe for ThreadSafeCache
impl Send for ThreadSafeCache
impl Sync for ThreadSafeCache
impl Unpin for ThreadSafeCache
impl !UnwindSafe for ThreadSafeCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more