pub trait QueryContext<'tcx>: HasDepContext {
// Required methods
fn jobserver_proxy(&self) -> &Proxy;
fn next_job_id(self) -> QueryJobId;
fn current_query_job(self) -> Option<QueryJobId>;
fn collect_active_jobs_from_all_queries(
self,
require_complete: bool,
) -> Result<QueryMap<'tcx>, QueryMap<'tcx>>;
fn load_side_effect(
self,
prev_dep_node_index: SerializedDepNodeIndex,
) -> Option<QuerySideEffect>;
fn store_side_effect(
self,
dep_node_index: DepNodeIndex,
side_effect: QuerySideEffect,
);
fn start_query<R>(
self,
token: QueryJobId,
depth_limit: bool,
compute: impl FnOnce() -> R,
) -> R;
}Required Methods§
Sourcefn jobserver_proxy(&self) -> &Proxy
fn jobserver_proxy(&self) -> &Proxy
Gets a jobserver reference which is used to release then acquire a token while waiting on a query.
fn next_job_id(self) -> QueryJobId
Sourcefn current_query_job(self) -> Option<QueryJobId>
fn current_query_job(self) -> Option<QueryJobId>
Get the query information from the TLS context.
fn collect_active_jobs_from_all_queries( self, require_complete: bool, ) -> Result<QueryMap<'tcx>, QueryMap<'tcx>>
Sourcefn load_side_effect(
self,
prev_dep_node_index: SerializedDepNodeIndex,
) -> Option<QuerySideEffect>
fn load_side_effect( self, prev_dep_node_index: SerializedDepNodeIndex, ) -> Option<QuerySideEffect>
Load a side effect associated to the node in the previous session.
Sourcefn store_side_effect(
self,
dep_node_index: DepNodeIndex,
side_effect: QuerySideEffect,
)
fn store_side_effect( self, dep_node_index: DepNodeIndex, side_effect: QuerySideEffect, )
Register a side effect for the given node, for use in next session.
Sourcefn start_query<R>(
self,
token: QueryJobId,
depth_limit: bool,
compute: impl FnOnce() -> R,
) -> R
fn start_query<R>( self, token: QueryJobId, depth_limit: bool, compute: impl FnOnce() -> R, ) -> R
Executes a job by changing the ImplicitCtxt to point to the
new query job while it executes.
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.