pub struct CachedEntry {
pub data: DataTable,
pub fetched_at: SystemTime,
pub ttl: Duration,
pub tags: Vec<String>,
pub metadata: HashMap<String, Value>,
}Expand description
One cached source entry. Cloning is cheap because DataTable is
Arc-backed; metadata + tag clones are a small HashMap/Vec.
Fields§
§data: DataTable§fetched_at: SystemTime§ttl: DurationFree-form tags for bulk invalidation. Typical values:
["slug:kyomi-analytics", "namespace:workspace-foo"].
metadata: HashMap<String, Value>Provider metadata preserved with the cached entry (from
FetchResult.metadata). Survives cache hits so callers see the same
bytes_billed / rows_returned as on the original fetch.
Implementations§
Source§impl CachedEntry
impl CachedEntry
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
true once the entry has aged past its TTL. Conservative — clock
regressions or SystemTime errors return true (treat as expired)
so we never serve a stale row by accident.
Trait Implementations§
Source§impl Clone for CachedEntry
impl Clone for CachedEntry
Source§fn clone(&self) -> CachedEntry
fn clone(&self) -> CachedEntry
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 CachedEntry
impl !RefUnwindSafe for CachedEntry
impl Send for CachedEntry
impl Sync for CachedEntry
impl Unpin for CachedEntry
impl UnsafeUnpin for CachedEntry
impl !UnwindSafe for CachedEntry
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