pub trait QueryContext: HasDepContext {
type QueryInfo: Clone;
// Required methods
fn next_job_id(self) -> QueryJobId;
fn current_query_job(self) -> Option<QueryJobId>;
fn collect_active_jobs(
self,
) -> Result<QueryMap<Self::QueryInfo>, QueryMap<Self::QueryInfo>>;
fn lift_query_info(self, info: &Self::QueryInfo) -> QueryStackFrameExtra;
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;
fn depth_limit_error(self, job: QueryJobId);
}
Required Associated Types§
Required Methods§
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( self, ) -> Result<QueryMap<Self::QueryInfo>, QueryMap<Self::QueryInfo>>
fn lift_query_info(self, info: &Self::QueryInfo) -> QueryStackFrameExtra
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.
fn depth_limit_error(self, job: QueryJobId)
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.