Struct rustc_query_system::query::caches::DefaultCache [−][src]
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 + Debug, [src]
K: Eq + Hash + Clone + Debug,
V: Clone + Debug,
type Key = K
type Sharded = FxHashMap<K, (V, DepNodeIndex)>
fn lookup<'s, R, OnHit>(
&self,
state: &'s QueryCacheStore<Self>,
key: &K,
on_hit: OnHit
) -> Result<R, QueryLookup> where
OnHit: FnOnce(&V, DepNodeIndex) -> R, [src]
&self,
state: &'s QueryCacheStore<Self>,
key: &K,
on_hit: OnHit
) -> Result<R, QueryLookup> where
OnHit: FnOnce(&V, DepNodeIndex) -> R,
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
fn iter<R>(
&self,
shards: &Sharded<Self::Sharded>,
f: impl for<'a> FnOnce(&'a mut dyn Iterator<Item = (&'a K, &'a V, DepNodeIndex)>) -> R
) -> R[src]
&self,
shards: &Sharded<Self::Sharded>,
f: impl for<'a> FnOnce(&'a mut dyn Iterator<Item = (&'a K, &'a V, DepNodeIndex)>) -> R
) -> R
impl<K: Eq + Hash, V: Clone + Debug> 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>,