moka/
sync.rs

1//! Provides thread-safe, concurrent cache implementations.
2
3mod builder;
4mod cache;
5mod entry_selector;
6mod segment;
7mod value_initializer;
8
9pub use crate::sync_base::{iter::Iter, PredicateId};
10pub use {
11    builder::CacheBuilder,
12    cache::Cache,
13    entry_selector::{OwnedKeyEntrySelector, RefKeyEntrySelector},
14    segment::SegmentedCache,
15};
16
17/// Provides extra methods that will be useful for testing.
18pub trait ConcurrentCacheExt<K, V> {
19    /// Performs any pending maintenance operations needed by the cache.
20    fn sync(&self);
21}
22
23// Empty struct to be used in `InitResult::InitErr` to represent the Option None.
24pub(crate) struct OptionallyNone;
25
26// Empty struct to be used in `InitResult::InitErr`` to represent the Compute None.
27pub(crate) struct ComputeNone;