Struct simple_disk_cache::SimpleCache [] [src]

pub struct SimpleCache<K, V> where
    K: Clone + Eq + Hash + Serialize + DeserializeOwned
{ /* fields omitted */ }

Methods

impl<K, V> SimpleCache<K, V> where
    K: DeserializeOwned + Serialize + Clone + Eq + Hash,
    V: DeserializeOwned + Serialize
[src]

[src]

[src]

Try getting a value from the cache.

Unless there is an error, this will either return Ok(Some(value)) if a value was found, or Ok(None) if no value for the key exists in the cache.

[src]

Insert a value into the cache.

If the key already exists, the previous value will be overwritten.

Trait Implementations

Auto Trait Implementations

impl<K, V> Send for SimpleCache<K, V> where
    K: Send + Sync,
    V: Send

impl<K, V> Sync for SimpleCache<K, V> where
    K: Send + Sync,
    V: Sync