Trait rustc_query_impl::QueryConfig
source · pub trait QueryConfig<Qcx>: Copywhere
Qcx: QueryContext,{
type Key: DepNodeParams<<Qcx as HasDepContext>::DepContext> + Eq + Hash + Copy + Debug;
type Value: Copy;
type Cache: QueryCache<Key = Self::Key, Value = Self::Value>;
Show 18 methods
// Required methods
fn name(self) -> &'static str;
fn format_value(self) -> fn(_: &Self::Value) -> String;
fn query_state<'a>(
self,
tcx: Qcx
) -> &'a QueryState<Self::Key, <Qcx as HasDepContext>::DepKind>
where Qcx: 'a;
fn query_cache<'a>(self, tcx: Qcx) -> &'a Self::Cache
where Qcx: 'a;
fn cache_on_disk(
self,
tcx: <Qcx as HasDepContext>::DepContext,
key: &Self::Key
) -> bool;
fn execute_query(
self,
tcx: <Qcx as HasDepContext>::DepContext,
k: Self::Key
) -> Self::Value;
fn compute(self, tcx: Qcx, key: Self::Key) -> Self::Value;
fn try_load_from_disk(
self,
qcx: Qcx,
idx: &Self::Key
) -> Option<fn(_: Qcx, _: SerializedDepNodeIndex) -> Option<Self::Value>>;
fn loadable_from_disk(
self,
qcx: Qcx,
key: &Self::Key,
idx: SerializedDepNodeIndex
) -> bool;
fn value_from_cycle_error(
self,
tcx: <Qcx as HasDepContext>::DepContext,
cycle: &[QueryInfo<<Qcx as HasDepContext>::DepKind>]
) -> Self::Value;
fn anon(self) -> bool;
fn eval_always(self) -> bool;
fn depth_limit(self) -> bool;
fn feedable(self) -> bool;
fn dep_kind(self) -> <Qcx as HasDepContext>::DepKind;
fn handle_cycle_error(self) -> HandleCycleError;
fn hash_result(
self
) -> Option<fn(_: &mut StableHashingContext<'_>, _: &Self::Value) -> Fingerprint>;
// Provided method
fn construct_dep_node(
self,
tcx: <Qcx as HasDepContext>::DepContext,
key: &Self::Key
) -> DepNode<<Qcx as HasDepContext>::DepKind> { ... }
}Required Associated Types§
type Key: DepNodeParams<<Qcx as HasDepContext>::DepContext> + Eq + Hash + Copy + Debug
type Value: Copy
type Cache: QueryCache<Key = Self::Key, Value = Self::Value>
Required Methods§
fn name(self) -> &'static str
fn format_value(self) -> fn(_: &Self::Value) -> String
fn query_state<'a>( self, tcx: Qcx ) -> &'a QueryState<Self::Key, <Qcx as HasDepContext>::DepKind>where Qcx: 'a,
fn query_cache<'a>(self, tcx: Qcx) -> &'a Self::Cachewhere Qcx: 'a,
fn cache_on_disk( self, tcx: <Qcx as HasDepContext>::DepContext, key: &Self::Key ) -> bool
fn execute_query( self, tcx: <Qcx as HasDepContext>::DepContext, k: Self::Key ) -> Self::Value
fn compute(self, tcx: Qcx, key: Self::Key) -> Self::Value
fn try_load_from_disk( self, qcx: Qcx, idx: &Self::Key ) -> Option<fn(_: Qcx, _: SerializedDepNodeIndex) -> Option<Self::Value>>
fn loadable_from_disk( self, qcx: Qcx, key: &Self::Key, idx: SerializedDepNodeIndex ) -> bool
sourcefn value_from_cycle_error(
self,
tcx: <Qcx as HasDepContext>::DepContext,
cycle: &[QueryInfo<<Qcx as HasDepContext>::DepKind>]
) -> Self::Value
fn value_from_cycle_error( self, tcx: <Qcx as HasDepContext>::DepContext, cycle: &[QueryInfo<<Qcx as HasDepContext>::DepKind>] ) -> Self::Value
Synthesize an error value to let compilation continue after a cycle.