pub trait OutputCache {
// Required methods
fn get(&self, id: &NodeId) -> Result<Option<Vec<u8>>>;
fn put(&mut self, id: &NodeId, bytes: &[u8]) -> Result<()>;
}Expand description
A node-output cache keyed by NodeId. Because a node’s id binds its full
dependency closure, an unchanged closure hits and a changed dependency misses;
there is no invalidation pass (ADR-0025).
Implementations are disposable: materialize_node_cached treats any get
error as a miss and never trusts bytes it cannot validate, so a corrupt cache
causes recomputation rather than wrong output.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".