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

Formats the value using the given formatter. Read more
if 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
Be careful when using this method inside a tracked function, because the default macro generated implementation will read all fields, maybe introducing undesired dependencies. Read more
Be careful when using this method inside a tracked function, because the default macro generated implementation will read all fields, maybe introducing undesired dependencies. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.