pub trait DepContext: Copy {
    type Deps: Deps;
    // Required methods
    fn with_stable_hashing_context<R>(
        self,
        f: impl FnOnce(StableHashingContext<'_>) -> R,
    ) -> R;
    fn dep_graph(&self) -> &DepGraph<Self::Deps>;
    fn profiler(&self) -> &SelfProfilerRef;
    fn sess(&self) -> &Session;
    fn dep_kind_info(&self, dep_node: DepKind) -> &DepKindStruct<Self>;
    fn with_reduced_queries<T>(self, _: impl FnOnce() -> T) -> T;
    // Provided methods
    fn fingerprint_style(self, kind: DepKind) -> FingerprintStyle { ... }
    fn is_eval_always(self, kind: DepKind) -> bool { ... }
    fn try_force_from_dep_node(
        self,
        dep_node: DepNode,
        prev_index: SerializedDepNodeIndex,
        frame: Option<&MarkFrame<'_>>,
    ) -> bool { ... }
    fn try_load_from_on_disk_cache(self, dep_node: DepNode) { ... }
}Required Associated Types§
Required Methods§
Sourcefn with_stable_hashing_context<R>(
    self,
    f: impl FnOnce(StableHashingContext<'_>) -> R,
) -> R
 
fn with_stable_hashing_context<R>( self, f: impl FnOnce(StableHashingContext<'_>) -> R, ) -> R
Create a hashing context for hashing new results.
Sourcefn profiler(&self) -> &SelfProfilerRef
 
fn profiler(&self) -> &SelfProfilerRef
Access the profiler.
fn dep_kind_info(&self, dep_node: DepKind) -> &DepKindStruct<Self>
fn with_reduced_queries<T>(self, _: impl FnOnce() -> T) -> T
Provided Methods§
fn fingerprint_style(self, kind: DepKind) -> FingerprintStyle
Sourcefn is_eval_always(self, kind: DepKind) -> bool
 
fn is_eval_always(self, kind: DepKind) -> bool
Return whether this kind always require evaluation.
Sourcefn try_force_from_dep_node(
    self,
    dep_node: DepNode,
    prev_index: SerializedDepNodeIndex,
    frame: Option<&MarkFrame<'_>>,
) -> bool
 
fn try_force_from_dep_node( self, dep_node: DepNode, prev_index: SerializedDepNodeIndex, frame: Option<&MarkFrame<'_>>, ) -> bool
Try to force a dep node to execute and see if it’s green.
Returns true if the query has actually been forced. It is valid that a query fails to be forced, e.g. when the query key cannot be reconstructed from the dep-node or when the query kind outright does not support it.
Sourcefn try_load_from_on_disk_cache(self, dep_node: DepNode)
 
fn try_load_from_on_disk_cache(self, dep_node: DepNode)
Load data from the on-disk cache.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.