[−][src]Struct rustc_query_system::query::caches::DefaultCache
Trait Implementations
impl<K, V> Default for DefaultCache<K, V>[src]
impl<K, V> QueryCache for DefaultCache<K, V> where
K: Eq + Hash + Clone + Debug,
V: Clone, [src]
K: Eq + Hash + Clone + Debug,
V: Clone,
type Key = K
type Sharded = FxHashMap<K, (V, DepNodeIndex)>
pub fn lookup<D, Q, R, OnHit, OnMiss>(
&self,
state: &QueryState<D, Q, Self>,
key: K,
on_hit: OnHit,
on_miss: OnMiss
) -> R where
OnHit: FnOnce(&V, DepNodeIndex) -> R,
OnMiss: FnOnce(K, QueryLookup<'_, D, Q, K, Self::Sharded>) -> R, [src]
&self,
state: &QueryState<D, Q, Self>,
key: K,
on_hit: OnHit,
on_miss: OnMiss
) -> R where
OnHit: FnOnce(&V, DepNodeIndex) -> R,
OnMiss: FnOnce(K, QueryLookup<'_, D, Q, K, Self::Sharded>) -> R,
pub fn complete(
&self,
lock_sharded_storage: &mut Self::Sharded,
key: K,
value: V,
index: DepNodeIndex
) -> Self::Stored[src]
&self,
lock_sharded_storage: &mut Self::Sharded,
key: K,
value: V,
index: DepNodeIndex
) -> Self::Stored
pub fn iter<R, L>(
&self,
shards: &Sharded<L>,
get_shard: impl Fn(&mut L) -> &mut Self::Sharded,
f: impl for<'a> FnOnce(Box<dyn Iterator<Item = (&'a K, &'a V, DepNodeIndex)> + 'a>) -> R
) -> R[src]
&self,
shards: &Sharded<L>,
get_shard: impl Fn(&mut L) -> &mut Self::Sharded,
f: impl for<'a> FnOnce(Box<dyn Iterator<Item = (&'a K, &'a V, DepNodeIndex)> + 'a>) -> R
) -> R
impl<K: Eq + Hash, V: Clone> QueryStorage for DefaultCache<K, V>[src]
Auto Trait Implementations
impl<K, V> RefUnwindSafe for DefaultCache<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for DefaultCache<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for DefaultCache<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for DefaultCache<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for DefaultCache<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,