Skip to main content

QueryDatabase

Trait QueryDatabase 

Source
pub trait QueryDatabase: Send + Sync {
    // Required methods
    fn current_revision(&self) -> Revision;
    fn increment_revision(&self) -> Revision;
    fn mark_in_progress(&self, id: QueryId);
    fn unmark_in_progress(&self, id: QueryId);
    fn is_in_progress(&self, id: QueryId) -> bool;
    fn record_dependency(&self, from: QueryId, to: QueryId);
}
Expand description

The central database trait that all query databases must implement.

Required Methods§

Source

fn current_revision(&self) -> Revision

Get the current revision of the database.

Source

fn increment_revision(&self) -> Revision

Increment the revision (called when inputs change).

Source

fn mark_in_progress(&self, id: QueryId)

Mark a query as in-progress (for cycle detection).

Source

fn unmark_in_progress(&self, id: QueryId)

Unmark a query as in-progress.

Source

fn is_in_progress(&self, id: QueryId) -> bool

Check if a query is in progress (cycle detection).

Source

fn record_dependency(&self, from: QueryId, to: QueryId)

Record a dependency from the current query to another.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§