pub struct SerializableCache {
pub items: Option<CachedItems>,
pub rivens: Option<CachedRivens>,
}Expand description
Serializable cache for persistence.
This is a separate type that can be serialized/deserialized,
unlike ApiCache which uses Instant (not serializable).
Fields§
§items: Option<CachedItems>Cached items (if any)
rivens: Option<CachedRivens>Cached rivens (if any)
Implementations§
Source§impl SerializableCache
impl SerializableCache
Sourcepub fn into_api_cache(self) -> ApiCache
pub fn into_api_cache(self) -> ApiCache
Convert to an ApiCache.
Note: The fetched_at times will be approximated based on the
stored Unix timestamps.
Trait Implementations§
Source§impl Clone for SerializableCache
impl Clone for SerializableCache
Source§fn clone(&self) -> SerializableCache
fn clone(&self) -> SerializableCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializableCache
impl Debug for SerializableCache
Source§impl Default for SerializableCache
impl Default for SerializableCache
Source§impl<'de> Deserialize<'de> for SerializableCache
impl<'de> Deserialize<'de> for SerializableCache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ApiCache> for SerializableCache
impl From<&ApiCache> for SerializableCache
Auto Trait Implementations§
impl Freeze for SerializableCache
impl RefUnwindSafe for SerializableCache
impl Send for SerializableCache
impl Sync for SerializableCache
impl Unpin for SerializableCache
impl UnwindSafe for SerializableCache
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