salsa - Rust
Skip to main content
- prelude
- Backtrace
- CancellationToken
- A cancellation token that can be used to cancel a query computation for a specific local
Database. - Cycle
- The context that the cycle recovery function receives when a query cycle occurs.
- DatabaseImpl
- Default database implementation that you can use if you don’t
require any custom user data.
- DatabaseKeyIndex
- An integer that uniquely identifies a particular query instance within the
database. Used to track input and output dependencies between queries. Fully
ordered and equatable but those orderings are arbitrary, and meant to be used
only for inserting into maps and the like.
- Durability
- Describes how likely a value is to change—how “durable” it is.
- Event
- The
Event struct identifies various notable things that can
occur during salsa execution. Instances of this struct are given
to salsa_event. - Id
- The
Id of a salsa struct in the database Table. - IngredientIndex
- An ingredient index identifies a particular [
Ingredient] in the database. - IngredientInfo
- Information about instances of a particular Salsa ingredient.
- Revision
- A unique identifier for the current version of the database.
- Runtime
- Storage
- Concrete implementation of the
Database trait with local state that can be used to drive computations. - StorageHandle
- A handle to non-local database state.
- Cancelled
- A panic payload indicating that execution of a salsa query was cancelled.
- EventKind
- An enum identifying the various kinds of events that can occur.
- Accumulator
- Trait implemented on the struct that user annotated with
#[salsa::accumulator].
The Self type is therefore the types to be accumulated. - Database
- The trait implemented by all Salsa databases.
You can create your own subtraits of this trait using the
#[salsa::db](crate::db) procedural macro. - HashEqLike
- A trait for types that hash and compare like
O. - Lookup
- The
Lookup trait is a more flexible variant on std::borrow::Borrow
and std::borrow::ToOwned. - SalsaAsDeref
- Used to determine the return type and value for tracked fields and functions annotated with
returns(as_deref). - SalsaAsRef
- Used to determine the return type and value for tracked fields and functions annotated with
returns(as_ref). - Setter
- Setter for a field of an input.
- Update
- Safety
- attach
- Attach the database to the current thread and execute
op.
Panics if a different database has already been attached. - attach_allow_change
- Attach the database to the current thread and execute
op.
Allows a different database than currently attached. The original database
will be restored on return. - with_attached_database
- Access the “attached” database. Returns
None if no database is attached.
Databases are attached with attach_database.
- accumulator
- db
- input
- interned
- tracked
- Supertype
- Update