Struct rustc_query_system::query::caches::SingleCache
source · pub struct SingleCache<V> {
cache: Lock<Option<(V, DepNodeIndex)>>,
}Fields§
§cache: Lock<Option<(V, DepNodeIndex)>>Trait Implementations§
source§impl<V> Default for SingleCache<V>
impl<V> Default for SingleCache<V>
source§impl<V> QueryCache for SingleCache<V>where
V: Copy + Debug,
impl<V> QueryCache for SingleCache<V>where V: Copy + Debug,
type Key = ()
type Value = V
source§fn lookup(&self, _key: &()) -> Option<(V, DepNodeIndex)>
fn lookup(&self, _key: &()) -> Option<(V, DepNodeIndex)>
Checks if the query is already computed and in the cache.
It returns the shard index and a lock guard to the shard,
which will be used if the query is not in the cache and we need
to compute it.
fn complete(&self, _key: (), value: V, index: DepNodeIndex)
fn iter(&self, f: &mut dyn FnMut(&Self::Key, &Self::Value, DepNodeIndex))
Auto Trait Implementations§
impl<V> !RefUnwindSafe for SingleCache<V>
impl<V> Send for SingleCache<V>where V: Send,
impl<V> !Sync for SingleCache<V>
impl<V> Unpin for SingleCache<V>where V: Unpin,
impl<V> UnwindSafe for SingleCache<V>where V: UnwindSafe,
Blanket Implementations§
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.