Struct salsa::Runtime[][src]

pub struct Runtime { /* fields omitted */ }
Expand description

The salsa runtime stores the storage for all queries as well as tracking the query stack and dependencies between cycles.

Each new runtime you create (e.g., via Runtime::new or Runtime::default) will have an independent set of query storage associated with it. Normally, therefore, you only do this once, at the start of your application.

Implementations

Create a new runtime; equivalent to Self::default. This is used when creating a new database.

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.

The unique identifier attached to this SalsaRuntime. Each snapshotted runtime has a distinct identifier.

Returns the database-key for the query that this thread is actively executing (if any).

Reports that the query depends on some state unknown to salsa.

Queries which report untracked reads will be re-executed in the next revision.

Acts as though the current query had read an input with the given durability; this will force the current query’s durability to be at most durability.

This is mostly useful to control the durability level for on-demand inputs.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.