[−][src]Struct rustc_query_system::query::plumbing::JobOwner

pub(in query::plumbing) struct JobOwner<'tcx, D, Q, C> where
    D: Copy + Clone + Eq + Hash,
    Q: Clone,
    C: QueryCache, 
{ state: &'tcx QueryState<D, Q, C>, key: C::Key, id: QueryJobId<D>, }

A type representing the responsibility to execute the job in the job field. This will poison the relevant query if dropped.

Fields

state: &'tcx QueryState<D, Q, C>key: C::Keyid: QueryJobId<D>

Implementations

impl<'tcx, D, Q, C> JobOwner<'tcx, D, Q, C> where
    D: Copy + Clone + Eq + Hash,
    Q: Clone,
    C: QueryCache, 
[src]

pub(in query::plumbing) fn try_start<'a, 'b, CTX>(
    tcx: CTX,
    state: &'b QueryState<CTX::DepKind, CTX::Query, C>,
    span: Span,
    key: &C::Key,
    lookup: QueryLookup<'a, CTX::DepKind, CTX::Query, C::Key, C::Sharded>,
    query: &QueryVtable<CTX, C::Key, C::Value>
) -> TryGetJob<'b, CTX::DepKind, CTX::Query, C> where
    CTX: QueryContext, 
[src]

Either gets a JobOwner corresponding the query, allowing us to start executing the query, or returns with the result of the query. This function assumes that try_get_cached is already called and returned lookup. If the query is executing elsewhere, this will wait for it and return the result. If the query panicked, this will silently panic.

This function is inlined because that results in a noticeable speed-up for some compile-time benchmarks.

pub(in query::plumbing) fn complete(
    self,
    result: C::Value,
    dep_node_index: DepNodeIndex
) -> C::Stored
[src]

Completes the query by updating the query cache with the result, signals the waiter and forgets the JobOwner, so it won't poison the query

Trait Implementations

impl<'tcx, D, Q, C> Drop for JobOwner<'tcx, D, Q, C> where
    D: Copy + Clone + Eq + Hash,
    Q: Clone,
    C: QueryCache, 
[src]

Auto Trait Implementations

impl<'tcx, D, Q, C> !RefUnwindSafe for JobOwner<'tcx, D, Q, C>

impl<'tcx, D, Q, C> !Send for JobOwner<'tcx, D, Q, C>

impl<'tcx, D, Q, C> !Sync for JobOwner<'tcx, D, Q, C>

impl<'tcx, D, Q, C> Unpin for JobOwner<'tcx, D, Q, C> where
    D: Unpin,
    <C as QueryCache>::Key: Unpin, 

impl<'tcx, D, Q, C> !UnwindSafe for JobOwner<'tcx, D, Q, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.