Trait rustc_query_system::query::caches::QueryCache
source · pub trait QueryCache: Sized {
type Key: Hash + Eq + Copy + Debug;
type Value: Copy;
// Required methods
fn lookup(&self, key: &Self::Key) -> Option<(Self::Value, DepNodeIndex)>;
fn complete(&self, key: Self::Key, value: Self::Value, index: DepNodeIndex);
fn iter(&self, f: &mut dyn FnMut(&Self::Key, &Self::Value, DepNodeIndex));
}
Required Associated Types§
Required Methods§
sourcefn lookup(&self, key: &Self::Key) -> Option<(Self::Value, DepNodeIndex)>
fn lookup(&self, key: &Self::Key) -> Option<(Self::Value, DepNodeIndex)>
Checks if the query is already computed and in the cache.
fn complete(&self, key: Self::Key, value: Self::Value, index: DepNodeIndex)
fn iter(&self, f: &mut dyn FnMut(&Self::Key, &Self::Value, DepNodeIndex))
Object Safety§
This trait is not object safe.