Trait QueryContext

Source
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§

Source

fn next_job_id(self) -> QueryJobId

Source

fn current_query_job(self) -> Option<QueryJobId>

Get the query information from the TLS context.

Source

fn collect_active_jobs( self, ) -> Result<QueryMap<Self::QueryInfo>, QueryMap<Self::QueryInfo>>

Source

fn lift_query_info(self, info: &Self::QueryInfo) -> QueryStackFrameExtra

Source

fn load_side_effect( self, prev_dep_node_index: SerializedDepNodeIndex, ) -> Option<QuerySideEffect>

Load a side effect associated to the node in the previous session.

Source

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.

Source

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.

Source

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.

Implementors§