Trait salsa::Database[][src]

pub trait Database: DatabaseOps {
    fn sweep_all(&self, strategy: SweepStrategy) { ... }
fn salsa_event(&self, event_fn: Event) { ... }
fn on_propagated_panic(&self) -> ! { ... }
fn salsa_runtime(&self) -> &Runtime { ... }
fn salsa_runtime_mut(&mut self) -> &mut Runtime { ... } }

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).

Provided methods

fn sweep_all(&self, strategy: SweepStrategy)[src]

Iterates through all query storage and removes any values that have not been used since the last revision was created. The intended use-cycle is that you first execute all of your “main” queries; this will ensure that all query values they consume are marked as used. You then invoke this method to remove other values that were not needed for your main query results.

fn salsa_event(&self, event_fn: Event)[src]

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.

fn on_propagated_panic(&self) -> ![src]

This function is invoked when a dependent query is being computed by the other thread, and that thread panics.

fn salsa_runtime(&self) -> &Runtime[src]

Gives access to the underlying salsa runtime.

fn salsa_runtime_mut(&mut self) -> &mut Runtime[src]

Gives access to the underlying salsa runtime.

Loading content...

Implementors

Loading content...