[−][src]Struct rustc_query_system::query::plumbing::JobOwner
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]
D: Copy + Clone + Eq + Hash,
Q: Clone,
C: QueryCache,
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]
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,
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]
self,
result: C::Value,
dep_node_index: DepNodeIndex
) -> C::Stored
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]
D: Copy + Clone + Eq + Hash,
Q: Clone,
C: QueryCache,
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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,