# Trait rustc_query_system::query::config::QueryConfig

source ·

    pub trait QueryConfig<Qcx: QueryContext>: Copy {
        type Key: DepNodeParams<Qcx::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>
           where Qcx: 'a;
        fn query_cache<'a>(self, tcx: Qcx) -> &'a Self::Cache
           where Qcx: 'a;
        fn cache_on_disk(self, tcx: Qcx::DepContext, key: &Self::Key) -> bool;
        fn execute_query(self, tcx: Qcx::DepContext, k: Self::Key) -> Self::Value;
        fn compute(self, tcx: Qcx, key: Self::Key) -> Self::Value;
        fn try_load_from_disk(
            self,
            tcx: Qcx,
            key: &Self::Key,
            prev_index: SerializedDepNodeIndex,
            index: DepNodeIndex,
        ) -> Option<Self::Value>;
        fn loadable_from_disk(
            self,
            qcx: Qcx,
            key: &Self::Key,
            idx: SerializedDepNodeIndex,
        ) -> bool;
        fn value_from_cycle_error(
            self,
            tcx: Qcx::DepContext,
            cycle_error: &CycleError,
            guar: ErrorGuaranteed,
        ) -> Self::Value;
        fn anon(self) -> bool;
        fn eval_always(self) -> bool;
        fn depth_limit(self) -> bool;
        fn feedable(self) -> bool;
        fn dep_kind(self) -> DepKind;
        fn handle_cycle_error(self) -> HandleCycleError;
        fn hash_result(self) -> HashResult<Self::Value>;

        // Provided method
        fn construct_dep_node(
            self,
            tcx: Qcx::DepContext,
            key: &Self::Key,
        ) -> DepNode { ... }
    }

## Required Associated Types§

source

#### type Key: DepNodeParams<Qcx::DepContext> + Eq + Hash + Copy + Debug

source

#### type Value: Copy

source

#### type Cache: QueryCache<Key = Self::Key, Value = Self::Value>

## Required Methods§

source

#### fn name(self) -> &'static str

source

#### fn format_value(self) -> fn(_: &Self::Value) -> String

source

#### fn query_state<'a>(self, tcx: Qcx) -> &'a QueryState<Self::Key>
where Qcx: 'a,

source

#### fn query_cache<'a>(self, tcx: Qcx) -> &'a Self::Cache
where Qcx: 'a,

source

#### fn cache_on_disk(self, tcx: Qcx::DepContext, key: &Self::Key) -> bool

source

#### fn execute_query(self, tcx: Qcx::DepContext, k: Self::Key) -> Self::Value

source

#### fn compute(self, tcx: Qcx, key: Self::Key) -> Self::Value

source

#### fn try_load_from_disk( self, tcx: Qcx, key: &Self::Key, prev_index: SerializedDepNodeIndex, index: DepNodeIndex, ) -> Option<Self::Value>

source

#### fn loadable_from_disk( self, qcx: Qcx, key: &Self::Key, idx: SerializedDepNodeIndex, ) -> bool

source

#### fn value_from_cycle_error( self, tcx: Qcx::DepContext, cycle_error: &CycleError, guar: ErrorGuaranteed, ) -> Self::Value

Synthesize an error value to let compilation continue after a cycle.

source

#### fn anon(self) -> bool

source

#### fn eval_always(self) -> bool

source

#### fn depth_limit(self) -> bool

source

#### fn feedable(self) -> bool

source

#### fn dep_kind(self) -> DepKind

source

#### fn handle_cycle_error(self) -> HandleCycleError

source

#### fn hash_result(self) -> HashResult<Self::Value>

## Provided Methods§

source

#### fn construct_dep_node(self, tcx: Qcx::DepContext, key: &Self::Key) -> DepNode

## Object Safety§

This trait is not object safe.

## Implementors§