Trait rustc_middle::dep_graph::dep_node::DepContext
source · pub trait DepContext: Copy {
type DepKind: DepKind;
fn with_stable_hashing_context<R>(
&self,
f: impl FnOnce(StableHashingContext<'_>) -> R
) -> R;
fn dep_graph(&self) -> &DepGraph<Self::DepKind>;
fn profiler(&self) -> &SelfProfilerRef;
fn sess(&self) -> &Session;
fn dep_kind_info(&self, dep_node: Self::DepKind) -> &DepKindStruct<Self>;
fn fingerprint_style(&self, kind: Self::DepKind) -> FingerprintStyle { ... }
fn is_eval_always(&self, kind: Self::DepKind) -> bool { ... }
fn try_force_from_dep_node(self, dep_node: DepNode<Self::DepKind>) -> bool { ... }
fn try_load_from_on_disk_cache(self, dep_node: DepNode<Self::DepKind>) { ... }
}
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: Self::DepKind) -> &DepKindStruct<Self>
Provided Methods§
fn fingerprint_style(&self, kind: Self::DepKind) -> FingerprintStyle
sourcefn is_eval_always(&self, kind: Self::DepKind) -> bool
fn is_eval_always(&self, kind: Self::DepKind) -> bool
Return whether this kind always require evaluation.
sourcefn try_force_from_dep_node(self, dep_node: DepNode<Self::DepKind>) -> bool
fn try_force_from_dep_node(self, dep_node: DepNode<Self::DepKind>) -> bool
Try to force a dep node to execute and see if it’s green.
sourcefn try_load_from_on_disk_cache(self, dep_node: DepNode<Self::DepKind>)
fn try_load_from_on_disk_cache(self, dep_node: DepNode<Self::DepKind>)
Load data from the on-disk cache.