pub(crate) struct RuntimeData<'db> {
pub db: &'db dyn Db,
inference_vars: RwLock<Vec<InferenceVarData<'db>>>,
sub_inference_var_pairs: Mutex<Set<(InferVarIndex, InferVarIndex)>>,
ready_to_execute: Mutex<Vec<Arc<CheckTask>>>,
waiting_on_inference_var: Mutex<Map<InferVarIndex, Vec<EqWaker>>>,
complete: AtomicBool,
next_task_id: AtomicU64,
root_log: LogHandle<'db>,
}Fields§
§db: &'db dyn Db§inference_vars: RwLock<Vec<InferenceVarData<'db>>>Stores the data for each inference variable created thus far.
sub_inference_var_pairs: Mutex<Set<(InferVarIndex, InferVarIndex)>>Pairs (a, b) of inference variables where a <: b is required.
We insert into this set when we are relating two inference variables.
If it is a new relation, then we know we must propagate bounds.
ready_to_execute: Mutex<Vec<Arc<CheckTask>>>List of tasks that are ready to execute.
waiting_on_inference_var: Mutex<Map<InferVarIndex, Vec<EqWaker>>>List of tasks that are blocked, keyed by the variable they are blocked on.
When the data for InferVarIndex changes, the tasks will be awoken.
complete: AtomicBoolIf true, inference state is frozen and will not change further.
next_task_id: AtomicU64Integer indicating the next task id; each task gets a unique id.
root_log: LogHandle<'db>Root log handle for this check. This handle is not used to record events, only to export the overall log. During the check, environments carry a log handle that is specific to the current task. This way when we log an event it is tied to the task that caused it.
Auto Trait Implementations§
impl<'db> !Freeze for RuntimeData<'db>
impl<'db> !RefUnwindSafe for RuntimeData<'db>
impl<'db> !Send for RuntimeData<'db>
impl<'db> !Sync for RuntimeData<'db>
impl<'db> Unpin for RuntimeData<'db>
impl<'db> UnsafeUnpin for RuntimeData<'db>
impl<'db> !UnwindSafe for RuntimeData<'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more