salsa - Rust (original) (raw)

prelude

Backtrace

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.

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.

UnexpectedCycle

Cancelled

A panic payload indicating that execution of a salsa query was cancelled.

CycleRecoveryAction

Return value from a cycle recovery function.

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.

AsDynDatabase

Upcast to a dyn Database.

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.

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.

join

par_map

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