[−][src]Struct rustc_query_system::query::caches::ArenaCache
Fields
arena: WorkerLocal<TypedArena<(V, DepNodeIndex)>>phantom: PhantomData<(K, &'tcx V)>Trait Implementations
impl<'tcx, K, V> Default for ArenaCache<'tcx, K, V>[src]
impl<'tcx, K, V: 'tcx> QueryCache for ArenaCache<'tcx, K, V> where
K: Eq + Hash + Clone + Debug, [src]
K: Eq + Hash + Clone + Debug,
type Key = K
type Sharded = FxHashMap<K, &'tcx (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(&&'tcx 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(&&'tcx 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<'tcx, K: Eq + Hash, V: 'tcx> QueryStorage for ArenaCache<'tcx, K, V>[src]
Auto Trait Implementations
impl<'tcx, K, V> !RefUnwindSafe for ArenaCache<'tcx, K, V>
impl<'tcx, K, V> Send for ArenaCache<'tcx, K, V> where
K: Send,
V: Send + Sync,
K: Send,
V: Send + Sync,
impl<'tcx, K, V> !Sync for ArenaCache<'tcx, K, V>
impl<'tcx, K, V> Unpin for ArenaCache<'tcx, K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<'tcx, K, V> UnwindSafe for ArenaCache<'tcx, K, V> where
K: UnwindSafe,
V: RefUnwindSafe + UnwindSafe,
K: UnwindSafe,
V: RefUnwindSafe + 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>,