pub struct CacheWrite<'a> {
pub key: &'a str,
pub fingerprint: &'a str,
pub json: &'a str,
pub anchor: Option<&'a str>,
}Expand description
The values crate::Store::agent_cache_put writes.
anchor is a node key; the blob stored beside it is captured by the store
from the graph at write time, exactly as MemoryWrite’s is, so there is one
place that decides what an anchor’s evidence is.
Fields§
§key: &'a strThe cache key. Content-addressed by the caller; nothing here interprets it.
fingerprint: &'a strThe freshness witness. A reader compares it with the fingerprint the current graph yields and treats a mismatch as a miss — capacity eviction is a separate, orthogonal policy.
json: &'a strThe cached payload.
anchor: Option<&'a str>The node key this entry is derived from, if any. Supplies the
anchor_valid half of the eviction order.
Trait Implementations§
Source§impl<'a> Clone for CacheWrite<'a>
impl<'a> Clone for CacheWrite<'a>
Source§fn clone(&self) -> CacheWrite<'a>
fn clone(&self) -> CacheWrite<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for CacheWrite<'a>
Auto Trait Implementations§
impl<'a> Freeze for CacheWrite<'a>
impl<'a> RefUnwindSafe for CacheWrite<'a>
impl<'a> Send for CacheWrite<'a>
impl<'a> Sync for CacheWrite<'a>
impl<'a> Unpin for CacheWrite<'a>
impl<'a> UnsafeUnpin for CacheWrite<'a>
impl<'a> UnwindSafe for CacheWrite<'a>
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