pub struct NoCache;Expand description
A cache that stores nothing; used by the backward-compatible
materialize_node wrapper and the use_cache = false cold court.
Trait Implementations§
impl Copy for NoCache
Source§impl OutputCache for NoCache
impl OutputCache for NoCache
Source§fn get(&self, _id: &NodeId) -> Result<Option<Vec<u8>>>
fn get(&self, _id: &NodeId) -> Result<Option<Vec<u8>>>
Fetch a cached node output, or
None on a miss. A get error is treated
as a miss by the caller (the cache is disposable, never authority).Source§fn put(&mut self, _id: &NodeId, _bytes: &[u8]) -> Result<()>
fn put(&mut self, _id: &NodeId, _bytes: &[u8]) -> Result<()>
Store a node output. Best-effort: a
put error does not fail the
materialization.Source§fn note(&mut self, _note: CacheNote<'_>)
fn note(&mut self, _note: CacheNote<'_>)
Phase 15.6. Advisory, best-effort reuse/store event, reported for every
cache hit and store. The default is a no-op, so
NoCache and
DerivedCache are byte-identical to a build without this method; it is
never on the exactness path and can never change an output.Auto Trait Implementations§
impl Freeze for NoCache
impl RefUnwindSafe for NoCache
impl Send for NoCache
impl Sync for NoCache
impl Unpin for NoCache
impl UnsafeUnpin for NoCache
impl UnwindSafe for NoCache
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