pub enum LookupResponse {
Hit {
payload: String,
tool_kind: String,
bytes: u64,
provenance: Option<Provenance>,
from_shared: bool,
file_roots: Vec<FileRootSpec>,
upstream_keys: Vec<String>,
},
Miss,
Invalidated,
}Variants§
Hit
Entry found. payload is base64-encoded raw bytes (small JSON
completions and short tool outputs cross the wire fine inside a
JSON envelope; the cost of base64 inflation is acceptable for
the volumes M4 handles single-tenant).
Fields
provenance: Option<Provenance>file_roots: Vec<FileRootSpec>File dependencies recorded at persist time. Defaults to empty so older servers that omit the field still deserialize. The client revalidates these against its own checkout before trusting the payload, which is the only mechanism that catches cross-machine drift where Bob’s tree differs from Alice’s. Server-side revalidation cannot catch this case because the server only sees its own filesystem.
upstream_keys: Vec<String>Upstream cache-key dependencies recorded at persist time.
Defaults to empty so an older peer that omits the field still
deserializes. Without this, a RemoteStore-backed cache
reconstructs every wire hit with an empty upstream set and
transitive cross-layer invalidation silently does nothing.
Miss
Invalidated
Entry existed but was invalidated (file root changed, upstream
dropped). The client should treat this identically to Miss
for cache-population purposes; the distinct kind lets stats
distinguish “never had it” from “had it, now stale”.
Trait Implementations§
Source§impl Clone for LookupResponse
impl Clone for LookupResponse
Source§fn clone(&self) -> LookupResponse
fn clone(&self) -> LookupResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LookupResponse
impl Debug for LookupResponse
Source§impl<'de> Deserialize<'de> for LookupResponse
impl<'de> Deserialize<'de> for LookupResponse
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>,
Source§impl PartialEq for LookupResponse
impl PartialEq for LookupResponse
Source§fn eq(&self, other: &LookupResponse) -> bool
fn eq(&self, other: &LookupResponse) -> bool
self and other values to be equal, and is used by ==.