[−][src]Crate salsa
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.
Modules
debug | Debugging APIs: these are meant for use when unit-testing or debugging your application but aren't ordinarily needed. |
Macros
database_storage | This macro generates the "query storage" that goes into your database. It requires you to list all of the query groups that you need as well as the queries within those groups. The format looks like so: |
query_group | A macro that helps in defining the "context trait" of a given module. This is a trait that defines everything that a block of queries need to execute, as well as defining the queries themselves that are exported for others to use. |
Structs
Event | The |
QueryTable | Return value from [the |
QueryTableMut | Return value from the |
Runtime | The salsa runtime stores the storage for all queries as well as tracking the query stack and dependencies between cycles. |
RuntimeId | A unique identifier for a particular runtime. Each time you create
a snapshot, a fresh |
Snapshot | Simple wrapper struct that takes ownership of a database |
SweepStrategy | The sweep strategy controls what data we will keep/discard when we
do a GC-sweep. The default ( |
Enums
EventKind | An enum identifying the various kinds of events that can occur. |
Traits
Database | 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). |
ParallelDatabase | 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 |
Query | Trait implements by all of the "special types" associated with each of your queries. |