pub fn with_permanent_from_iter(
        idle: time::Duration,
        iter: impl IntoIterator<Item = (K, V)>,
    ) -> Self
    where
        S: Default,
        V: Clone,
    {
        let entries = iter
            .into_iter()
            .map(|(k, v)| (k, CacheEntry::permanent(v)))
            .collect();
        let inner = Arc::new(RwLock::new(entries));
        Self { inner, idle }
    }
/// Creates a new cache with a set of permanent entries.
Creates a new cache with a set of permanent entries.
Creates a new cache with a set of permanent entries .
pub fn with_permanent_from_iter(
        idle: time::Duration,
        iter: impl IntoIterator<Item = (K, V)>,
    ) -> Self
    where
        S: Default,
        V: Clone,
    {
        let entries = iter
            .into_iter()
            .map(|(k, v)| (k, CacheEntry::permanent(v)))
            .collect();
        let inner = Arc::new(RwLock::new(entries));
        Self { inner, idle }
    }
pub fn with_permanent_from_iter ( idle : time :: Duration , iter : impl IntoIterator < Item = ( K , V ) > , ) -> Self where S : Default , V : Clone , { let entries = iter . into_iter ( ) . map ( | ( k , v ) | ( k , CacheEntry :: permanent ( v ) ) ) . collect ( ) ; let inner = Arc :: new ( RwLock :: new ( entries ) ) ; Self { inner , idle } }
Creates a new cache with a set of permanent entries.
Creates a new cache with a set of permanent entries .
idle
time::Duration
iter
impl IntoIterator<Item = (K, V)>