pub struct CacheContext {
pub key: String,
pub is_cached: bool,
pub ttl_remaining: Option<Duration>,
pub cached_at: Option<Instant>,
pub metadata: HashMap<String, String>,
}Expand description
Context information for cache operations.
Fields§
§key: StringCache key
is_cached: boolWhether value exists in cache
ttl_remaining: Option<Duration>Remaining TTL if cached
cached_at: Option<Instant>Timestamp of last cache update
metadata: HashMap<String, String>Custom metadata (user-provided)
Implementations§
Trait Implementations§
Source§impl Clone for CacheContext
impl Clone for CacheContext
Source§fn clone(&self) -> CacheContext
fn clone(&self) -> CacheContext
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 moreAuto Trait Implementations§
impl Freeze for CacheContext
impl RefUnwindSafe for CacheContext
impl Send for CacheContext
impl Sync for CacheContext
impl Unpin for CacheContext
impl UnwindSafe for CacheContext
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