pub struct DiscreteFileStoreNonVolatile<Key, Value, Serde>where
Key: Clone + Eq + Hash + Serialize + for<'a> Deserialize<'a>,
Value: Serialize + for<'a> Deserialize<'a>,
Serde: DiscreteFileSerializerDeserializer<Value>,{ /* private fields */ }Expand description
Before using, strongly consider using the volatile version. Do you really need this cache to rehydrate without hitting the source of record? You are sacrificing reboot to clear corruption and now must consider N vs N+1 schema issues when downgrading or upgrading your application.
Implementations§
Source§impl<Key, Value, Serde> DiscreteFileStoreNonVolatile<Key, Record<Key, Value>, Serde>where
Key: Clone + Eq + Hash + Serialize + for<'a> Deserialize<'a>,
Value: Serialize + for<'a> Deserialize<'a>,
Serde: DiscreteFileSerializerDeserializer<Record<Key, Value>>,
impl<Key, Value, Serde> DiscreteFileStoreNonVolatile<Key, Record<Key, Value>, Serde>where
Key: Clone + Eq + Hash + Serialize + for<'a> Deserialize<'a>,
Value: Serialize + for<'a> Deserialize<'a>,
Serde: DiscreteFileSerializerDeserializer<Record<Key, Value>>,
Trait Implementations§
Source§impl<Key, Value, Serde> CacheStoreStrategy<Key, Value> for DiscreteFileStoreNonVolatile<Key, Record<Key, Value>, Serde>where
Key: Clone + Eq + Hash + Serialize + for<'a> Deserialize<'a>,
Value: Serialize + for<'a> Deserialize<'a>,
Serde: DiscreteFileSerializerDeserializer<Record<Key, Value>>,
impl<Key, Value, Serde> CacheStoreStrategy<Key, Value> for DiscreteFileStoreNonVolatile<Key, Record<Key, Value>, Serde>where
Key: Clone + Eq + Hash + Serialize + for<'a> Deserialize<'a>,
Value: Serialize + for<'a> Deserialize<'a>,
Serde: DiscreteFileSerializerDeserializer<Record<Key, Value>>,
fn get(&self, key: &Key) -> Option<Value>
Source§fn peek(&self, key: &Key) -> Option<Value>
fn peek(&self, key: &Key) -> Option<Value>
A platform read of a value. When replacement strategies are used (e.g. LRU) reads have side
effects that update internal tracking. If hydration requires inspecting the current state,
these reads will skew tracking. Peek allows you to inspect state without side effects, it
signals to any layer that a platform read has occurred that should be ignored for usage
tracking purposes. Read more
fn put(&mut self, key: &Key, value: Value)
fn delete(&mut self, key: &Key) -> bool
fn flush(&mut self)
fn get_keys(&self) -> KeyIterator<'_, Key>
fn contains(&self, key: &Key) -> bool
Auto Trait Implementations§
impl<Key, Value, Serde> Freeze for DiscreteFileStoreNonVolatile<Key, Value, Serde>
impl<Key, Value, Serde> RefUnwindSafe for DiscreteFileStoreNonVolatile<Key, Value, Serde>
impl<Key, Value, Serde> Send for DiscreteFileStoreNonVolatile<Key, Value, Serde>
impl<Key, Value, Serde> Sync for DiscreteFileStoreNonVolatile<Key, Value, Serde>
impl<Key, Value, Serde> Unpin for DiscreteFileStoreNonVolatile<Key, Value, Serde>
impl<Key, Value, Serde> UnwindSafe for DiscreteFileStoreNonVolatile<Key, Value, Serde>
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