Trait salsa_2022::database::Database
source · [−]pub trait Database: HasJarsDyn + AsSalsaDatabase {
fn salsa_event(&self, event: Event) { ... }
fn synthetic_write(&mut self, durability: Durability) { ... }
fn report_untracked_read(&self) { ... }
}
Provided Methods
sourcefn salsa_event(&self, event: Event)
fn salsa_event(&self, event: Event)
This function is invoked at key points in the salsa runtime. It permits the database to be customized and to inject logging or other custom behavior.
By default, the event is logged at level debug using
the standard log
facade.
sourcefn synthetic_write(&mut self, durability: Durability)
fn synthetic_write(&mut self, durability: Durability)
A “synthetic write” causes the system to act as though some
input of durability durability
has changed. This is mostly
useful for profiling scenarios.
WARNING: Just like an ordinary write, this method triggers cancellation. If you invoke it while a snapshot exists, it will block until that snapshot is dropped – if that snapshot is owned by the current thread, this could trigger deadlock.
sourcefn report_untracked_read(&self)
fn report_untracked_read(&self)
Reports that the query depends on some state unknown to salsa.
Queries which report untracked reads will be re-executed in the next revision.