Struct TestDb

Source
pub struct TestDb { /* private fields */ }

Trait Implementations§

Source§

impl Database for TestDb

§

fn sweep_all(&self, strategy: SweepStrategy)

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)

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

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

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
Source§

impl DatabaseOps for TestDb

Source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
Source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
Source§

fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
Source§

fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result

Formats a database key index in a human readable fashion.
Source§

fn maybe_changed_since( &self, input: DatabaseKeyIndex, revision: Revision, ) -> bool

True if the computed value for input may have changed since revision.
Source§

fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))

Executes the callback for each kind of query.
Source§

impl DatabaseStorageTypes for TestDb

Source§

type DatabaseStorage = __SalsaDatabaseStorage

Defines the “storage type”, where all the query data is kept. This type is defined by the database_storage macro.
Source§

impl Default for TestDb

Source§

fn default() -> TestDb

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

impl HasQueryGroup<SourceDbStorage> for TestDb

Source§

fn group_storage(&self) -> &<SourceDbStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.

Auto Trait Implementations§

§

impl !Freeze for TestDb

§

impl RefUnwindSafe for TestDb

§

impl !Send for TestDb

§

impl !Sync for TestDb

§

impl Unpin for TestDb

§

impl UnwindSafe for TestDb

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<DB> SourceDb for DB
where DB: Database + HasQueryGroup<SourceDbStorage>,

Source§

fn intern_file(&self, key0: File) -> SourceFileId

Source§

fn lookup_intern_file(&self, key0: SourceFileId) -> File

Source§

fn file_content(&self, key0: SourceFileId) -> Rc<str>

Set with `fn set_file_content(&mut self, file: SourceFileId, content: Rc)
Source§

fn set_file_content(&mut self, key0: SourceFileId, value__: Rc<str>)

Set the value of the file_content input. Read more
Source§

fn set_file_content_with_durability( &mut self, key0: SourceFileId, value__: Rc<str>, durability__: Durability, )

Set the value of the file_content input and promise that its value will never change again. Read more
Source§

fn file_line_starts(&self, key0: SourceFileId) -> Rc<[usize]>

Source§

fn file_name(&self, key0: SourceFileId) -> SmolStr

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.