The salsa crate is a crate for incremental recomputation. It permits you to define a "database" of queries with both inputs and values derived from those inputs; as you set the inputs, you can re-execute the derived queries and it will try to re-use results from previous invocations as appropriate.
Debugging APIs: these are meant for use when unit-testing or debugging your application but aren't ordinarily needed.
The "raw-id" is used for interned keys in salsa -- it is basically a newtype'd u32. Typically, it is wrapped in a type of your own devising. For more information about interned keys, see the interned key RFC.
Return value from [the
Return value from the
The salsa runtime stores the storage for all queries as well as tracking the query stack and dependencies between cycles.
A unique identifier for a particular runtime. Each time you create
a snapshot, a fresh
Simple wrapper struct that takes ownership of a database
The sweep strategy controls what data we will keep/discard when we
do a GC-sweep. The default (
An enum identifying the various kinds of events that can occur.
The base trait which your "query context" must implement. Gives access to the salsa runtime, which you must embed into your query context (along with whatever other state you may require).
Trait implemented for the "key" that results from a
Indicates a database that also supports parallel query
evaluation. All of Salsa's base query support is capable of
parallel execution, but for it to work, your query key/value types
must also be
Trait implements by all of the "special types" associated with each of your queries.