pub struct CacheKey {
pub plan_hash: u64,
pub capability_version: u64,
}Expand description
Composite cache lookup key: plan-hash + capability version.
Fields§
§plan_hash: u64SipHash digest of the plan’s postcard byte form.
capability_version: u64CapabilityIndex::version() snapshot at plan time.
Implementations§
Source§impl CacheKey
impl CacheKey
Sourcepub fn for_plan(plan: &ExecutionPlan, capability_version: u64) -> Option<Self>
pub fn for_plan(plan: &ExecutionPlan, capability_version: u64) -> Option<Self>
Hash a plan into a cache key for the given capability version. Per locked decision #1, plans are byte-identical- deterministic, so encode + hash is stable across runs.
Returns None when the plan contains a node postcard
can’t encode (currently: any Filter / Discovered
node, because PredicateWire uses #[serde(tag)]).
Callers treat that as a transparent cache bypass.
Trait Implementations§
impl Copy for CacheKey
impl Eq for CacheKey
impl StructuralPartialEq for CacheKey
Auto Trait Implementations§
impl Freeze for CacheKey
impl RefUnwindSafe for CacheKey
impl Send for CacheKey
impl Sync for CacheKey
impl Unpin for CacheKey
impl UnsafeUnpin for CacheKey
impl UnwindSafe for CacheKey
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.