Enum salsa_2022::event::EventKind
source · [−]pub enum EventKind {
DidValidateMemoizedValue {
database_key: DatabaseKeyIndex,
},
WillBlockOn {
other_runtime_id: RuntimeId,
database_key: DatabaseKeyIndex,
},
WillExecute {
database_key: DatabaseKeyIndex,
},
WillCheckCancellation,
WillDiscardStaleOutput {
execute_key: DatabaseKeyIndex,
output_key: DependencyIndex,
},
DidDiscard {
key: DatabaseKeyIndex,
},
DidDiscardAccumulated {
executor_key: DatabaseKeyIndex,
accumulator: DependencyIndex,
},
}
Expand description
An enum identifying the various kinds of events that can occur.
Variants
DidValidateMemoizedValue
Fields
database_key: DatabaseKeyIndex
The database-key for the affected value. Implements Debug
.
Occurs when we found that all inputs to a memoized value are up-to-date and hence the value can be re-used without executing the closure.
Executes before the “re-used” value is returned.
WillBlockOn
Fields
other_runtime_id: RuntimeId
The id of the runtime we will block on.
database_key: DatabaseKeyIndex
The database-key for the affected value. Implements Debug
.
Indicates that another thread (with id other_runtime_id
) is processing the
given query (database_key
), so we will block until they
finish.
Executes after we have registered with the other thread but before they have answered us.
(NB: you can find the id
of the current thread via the
runtime
)
WillExecute
Fields
database_key: DatabaseKeyIndex
The database-key for the affected value. Implements Debug
.
Indicates that the function for this query will be executed. This is either because it has never executed before or because its inputs may be out of date.
WillCheckCancellation
Indicates that unwind_if_cancelled
was called and salsa will check if
the current revision has been cancelled.
WillDiscardStaleOutput
Fields
execute_key: DatabaseKeyIndex
Key for the query that is executing and which no longer outputs the given value.
output_key: DependencyIndex
Key for the query that is no longer output
Discovered that a query used to output a given output but no longer does.
DidDiscard
Fields
key: DatabaseKeyIndex
Value being discarded.
Tracked structs or memoized data were discarded (freed).
DidDiscardAccumulated
Fields
executor_key: DatabaseKeyIndex
The key of the fn that accumulated results
accumulator: DependencyIndex
Accumulator that was accumulated into
Discarded accumulated data from a given fn
Trait Implementations
sourceimpl<Db> DebugWithDb<Db> for EventKindwhere
Db: ?Sized + Database,
impl<Db> DebugWithDb<Db> for EventKindwhere
Db: ?Sized + Database,
sourcefn fmt(&self, fmt: &mut Formatter<'_>, db: &Db, include_all_fields: bool) -> Result
fn fmt(&self, fmt: &mut Formatter<'_>, db: &Db, include_all_fields: bool) -> Result
include_all_fields
is false
only identity fields should be read, which means:
- for #[salsa::input] no fields
- for #[salsa::tracked] only fields with #[id]
attribute
- for #[salsa::interned] any field Read more