pub fn new(
        inner_backend: Box<dyn CacheBackend<K = K, V = V>>,
        ttl_provider: Arc<dyn TtlProvider<K = K, V = V>>,
        time_provider: Arc<dyn TimeProvider>,
    ) -> Self {
        assert!(inner_backend.is_empty(), "inner backend is not empty");

        Self {
            inner_backend,
            ttl_provider,
            time_provider,
            expiration: Default::default(),
        }
    }
/// Create new backend w/o any known keys.
///
/// The inner backend MUST NOT contain any data at this point, otherwise we will not track any TTLs for these entries.
///
/// # Panic
/// If the inner backend is not empty.
Create new backend w/o any known keys.
The inner backend MUST NOT contain any data at this point, otherwise we will not track any TTLs for these entries.
Create new backend w / o any known keys . The inner backend MUST NOT contain any data at this point otherwise we will not track any TTLs for these entries .
pub fn new(
        inner_backend: Box<dyn CacheBackend<K = K, V = V>>,
        ttl_provider: Arc<dyn TtlProvider<K = K, V = V>>,
        time_provider: Arc<dyn TimeProvider>,
    ) -> Self {
        assert!(inner_backend.is_empty(), "inner backend is not empty");
        Self {
            inner_backend,
            ttl_provider,
            time_provider,
            expiration: Default::default(),
        }
    }
pub fn new ( inner_backend : Box < dyn CacheBackend < K = K , V = V > > , ttl_provider : Arc < dyn TtlProvider < K = K , V = V > > , time_provider : Arc < dyn TimeProvider > , ) -> Self { assert ! ( inner_backend is_empty ( ) " " ) ; Self { inner_backend , ttl_provider , time_provider , expiration : Default :: default ( ) , } }
Create new backend w/o any known keys.
Create new backend w / o any known keys .
inner_backend
Box<dyn CacheBackend<K = K, V = V>>
ttl_provider
Arc<dyn TtlProvider<K = K, V = V>>
time_provider
Arc<dyn TimeProvider>
inner_backend
Box<dyn CacheBackend<K = K, V = V>>
ttl_provider
Arc<dyn TtlProvider<K = K, V = V>>
time_provider
Arc<dyn TimeProvider>
panic
If the inner backend is not empty.
If the inner backend is not empty .