pub struct FilesDatabaseForTesting { /* private fields */ }

Trait Implementations§

source§

impl AsFilesGroupMut for FilesDatabaseForTesting

source§

fn as_files_group_mut(&mut self) -> &mut (dyn FilesGroup + 'static)

source§

impl Database for FilesDatabaseForTesting

source§

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.
source§

fn unwind_if_cancelled(&self)

Starts unwinding the stack if the current revision is cancelled. Read more
source§

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime. Read more
source§

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

Gives access to the underlying salsa runtime. Read more
source§

impl DatabaseOps for FilesDatabaseForTesting

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 FilesDatabaseForTesting

§

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 FilesDatabaseForTesting

source§

fn default() -> Self

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

impl HasQueryGroup<FilesDatabase> for FilesDatabaseForTesting

source§

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

Access the group storage struct from the database.
source§

impl Upcast<dyn FilesGroup> for FilesDatabaseForTesting

source§

fn upcast(&self) -> &(dyn FilesGroup + 'static)

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<DB> FilesGroup for DBwhere DB: Database + HasQueryGroup<FilesDatabase>,

source§

fn intern_crate(&self, crt: CrateLongId) -> CrateId

source§

fn lookup_intern_crate(&self, key: CrateId) -> CrateLongId

source§

fn intern_file(&self, file: FileLongId) -> FileId

source§

fn lookup_intern_file(&self, key: FileId) -> FileLongId

source§

fn intern_flag(&self, flag: FlagLongId) -> FlagId

source§

fn lookup_intern_flag(&self, key: FlagId) -> FlagLongId

source§

fn crate_roots(&self) -> Arc<OrderedHashMap<CrateId, Directory>>

Main input of the project. Lists all the crates.
source§

fn set_crate_roots(&mut self, value__: Arc<OrderedHashMap<CrateId, Directory>>)

Set the value of the crate_roots input. Read more
source§

fn set_crate_roots_with_durability( &mut self, value__: Arc<OrderedHashMap<CrateId, Directory>>, durability__: Durability )

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

fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<String>>>

Overrides for file content. Mostly used by language server and tests. TODO(spapini): Currently, when this input changes, all the file_content() queries will be invalidated. Change this mechanism to hold file_overrides on the db struct outside salsa mechanism, and invalidate manually.
source§

fn set_file_overrides( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<String>>> )

Set the value of the file_overrides input. Read more
source§

fn set_file_overrides_with_durability( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<String>>>, durability__: Durability )

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

fn flags(&self) -> Arc<OrderedHashMap<FlagId, Arc<Flag>>>

The compilation flags.
source§

fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>)

Set the value of the flags input. Read more
source§

fn set_flags_with_durability( &mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>, durability__: Durability )

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

fn cfg_set(&self) -> Arc<CfgSet>

The #[cfg(...)] options.
source§

fn set_cfg_set(&mut self, value__: Arc<CfgSet>)

Set the value of the cfg_set input. Read more
source§

fn set_cfg_set_with_durability( &mut self, value__: Arc<CfgSet>, durability__: Durability )

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

fn crates(&self) -> Vec<CrateId, Global>

List of crates in the project.
source§

fn crate_root_dir(&self, crate_id: CrateId) -> Option<Directory>

Root directory of the crate.
source§

fn priv_raw_file_content(&self, file_id: FileId) -> Option<Arc<String>>

Query for raw file contents. Private.
source§

fn file_content(&self, file_id: FileId) -> Option<Arc<String>>

Query for the file contents. This takes overrides into consideration.
source§

fn file_summary(&self, file_id: FileId) -> Option<Arc<FileSummary>>

source§

fn get_flag(&self, id: FlagId) -> Option<Arc<Flag>>

Query to get a compilation flag by its ID.
source§

impl<T> FilesGroupEx for Twhere T: Upcast<dyn FilesGroup> + AsFilesGroupMut + ?Sized,

source§

fn override_file_content(&mut self, file: FileId, content: Option<Arc<String>>)

Overrides file content. None value removes the override.
source§

fn set_crate_root(&mut self, crt: CrateId, root: Option<Directory>)

Sets the root directory of the crate. None value removes the crate.
source§

fn set_flag(&mut self, id: FlagId, value: Option<Arc<Flag>>)

Sets the given flag value. None value removes the flag.
source§

fn use_cfg(&mut self, cfg_set: &CfgSet)

Merges specified CfgSet into one already stored in this db.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> Upcast<T> for Twhere T: ?Sized,

source§

fn upcast(&self) -> &T

source§

impl<T> UpcastMut<T> for Twhere T: ?Sized,

source§

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