pub struct FilesDatabaseForTesting { /* private fields */ }
Trait Implementations§
Source§impl AsFilesGroupMut for FilesDatabaseForTesting
impl AsFilesGroupMut for FilesDatabaseForTesting
fn as_files_group_mut(&mut self) -> &mut (dyn FilesGroup + 'static)
Source§impl Database for FilesDatabaseForTesting
impl Database for FilesDatabaseForTesting
Source§fn salsa_event(&self, event_fn: Event)
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)
fn unwind_if_cancelled(&self)
Starts unwinding the stack if the current revision is cancelled. Read more
Source§fn salsa_runtime(&self) -> &Runtime
fn salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime. Read more
Source§fn salsa_runtime_mut(&mut self) -> &mut Runtime
fn salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime. Read more
Source§impl DatabaseOps for FilesDatabaseForTesting
impl DatabaseOps for FilesDatabaseForTesting
Source§fn ops_database(&self) -> &dyn Database
fn ops_database(&self) -> &dyn Database
Upcast this type to a
dyn Database
.Source§fn ops_salsa_runtime(&self) -> &Runtime
fn ops_salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
Source§fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
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
fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
Formats a database key index in a human readable fashion.
Source§fn maybe_changed_after(
&self,
input: DatabaseKeyIndex,
revision: Revision,
) -> bool
fn maybe_changed_after( &self, input: DatabaseKeyIndex, revision: Revision, ) -> bool
True if the computed value for
input
may have changed since revision
.Source§fn cycle_recovery_strategy(
&self,
input: DatabaseKeyIndex,
) -> CycleRecoveryStrategy
fn cycle_recovery_strategy( &self, input: DatabaseKeyIndex, ) -> CycleRecoveryStrategy
Find the
CycleRecoveryStrategy
for a given input.Source§fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
Executes the callback for each kind of query.
Source§impl DatabaseStorageTypes for FilesDatabaseForTesting
impl DatabaseStorageTypes for FilesDatabaseForTesting
Source§type DatabaseStorage = __SalsaDatabaseStorage
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
impl Default for FilesDatabaseForTesting
Source§impl ExternalFiles for FilesDatabaseForTesting
impl ExternalFiles for FilesDatabaseForTesting
Source§fn ext_as_virtual(&self, external_id: InternId) -> VirtualFile
fn ext_as_virtual(&self, external_id: InternId) -> VirtualFile
Returns the virtual file matching the external id.
Source§fn try_ext_as_virtual(&self, _external_id: InternId) -> Option<VirtualFile>
fn try_ext_as_virtual(&self, _external_id: InternId) -> Option<VirtualFile>
Returns the virtual file matching the external id if found.
Source§impl HasQueryGroup<FilesDatabase> for FilesDatabaseForTesting
impl HasQueryGroup<FilesDatabase> for FilesDatabaseForTesting
Source§fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
Source§fn group_storage_mut(
&mut self,
) -> (&<FilesDatabase as QueryGroup>::GroupStorage, &mut Runtime)
fn group_storage_mut( &mut self, ) -> (&<FilesDatabase as QueryGroup>::GroupStorage, &mut Runtime)
Access the group storage struct from the database.
Also returns a ref to the
Runtime
, since otherwise
the database is borrowed and one cannot get access to it.Source§impl Upcast<dyn FilesGroup> for FilesDatabaseForTesting
impl Upcast<dyn FilesGroup> for FilesDatabaseForTesting
fn upcast(&self) -> &(dyn FilesGroup + 'static)
Auto Trait Implementations§
impl !Freeze for FilesDatabaseForTesting
impl RefUnwindSafe for FilesDatabaseForTesting
impl Send for FilesDatabaseForTesting
impl !Sync for FilesDatabaseForTesting
impl Unpin for FilesDatabaseForTesting
impl UnwindSafe for FilesDatabaseForTesting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<DB> FilesGroup for DB
impl<DB> FilesGroup for DB
fn intern_crate(&self, crt: CrateLongId) -> CrateId
fn lookup_intern_crate(&self, key: CrateId) -> CrateLongId
fn intern_file(&self, file: FileLongId) -> FileId
fn lookup_intern_file(&self, key: FileId) -> FileLongId
fn intern_flag(&self, flag: FlagLongId) -> FlagId
fn lookup_intern_flag(&self, key: FlagId) -> FlagLongId
Source§fn crate_configs(&self) -> Arc<OrderedHashMap<CrateId, CrateConfiguration>>
fn crate_configs(&self) -> Arc<OrderedHashMap<CrateId, CrateConfiguration>>
Main input of the project. Lists all the crates configurations.
Source§fn set_crate_configs(
&mut self,
value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>,
)
fn set_crate_configs( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, )
Set the value of the
crate_configs
input. Read moreSource§fn set_crate_configs_with_durability(
&mut self,
value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>,
durability__: Durability,
)
fn set_crate_configs_with_durability( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, durability__: Durability, )
Set the value of the
crate_configs
input with a
specific durability instead of the default of
Durability::LOW
. You can use Durability::MAX
to promise that its value will never change again. Read moreSource§fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<str>>>
fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<str>>>
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<str>>>)
fn set_file_overrides(&mut self, value__: Arc<OrderedHashMap<FileId, Arc<str>>>)
Set the value of the
file_overrides
input. Read moreSource§fn set_file_overrides_with_durability(
&mut self,
value__: Arc<OrderedHashMap<FileId, Arc<str>>>,
durability__: Durability,
)
fn set_file_overrides_with_durability( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<str>>>, durability__: Durability, )
Set the value of the
file_overrides
input with a
specific durability instead of the default of
Durability::LOW
. You can use Durability::MAX
to promise that its value will never change again. Read moreSource§fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>)
fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>)
Set the value of the
flags
input. Read moreSource§fn set_flags_with_durability(
&mut self,
value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>,
durability__: Durability,
)
fn set_flags_with_durability( &mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>, durability__: Durability, )
Set the value of the
flags
input with a
specific durability instead of the default of
Durability::LOW
. You can use Durability::MAX
to promise that its value will never change again. Read moreSource§fn set_cfg_set_with_durability(
&mut self,
value__: Arc<CfgSet>,
durability__: Durability,
)
fn set_cfg_set_with_durability( &mut self, value__: Arc<CfgSet>, durability__: Durability, )
Set the value of the
cfg_set
input with a
specific durability instead of the default of
Durability::LOW
. You can use Durability::MAX
to promise that its value will never change again. Read moreSource§fn crate_config(&self, crate_id: CrateId) -> Option<CrateConfiguration>
fn crate_config(&self, crate_id: CrateId) -> Option<CrateConfiguration>
Configuration of the crate.
Source§fn priv_raw_file_content(&self, file_id: FileId) -> Option<Arc<str>>
fn priv_raw_file_content(&self, file_id: FileId) -> Option<Arc<str>>
Query for raw file contents. Private.
Source§fn file_content(&self, file_id: FileId) -> Option<Arc<str>>
fn file_content(&self, file_id: FileId) -> Option<Arc<str>>
Query for the file contents. This takes overrides into consideration.
fn file_summary(&self, file_id: FileId) -> Option<Arc<FileSummary>>
Source§impl<T> FilesGroupEx for T
impl<T> FilesGroupEx for T
Source§fn override_file_content(&mut self, file: FileId, content: Option<Arc<str>>)
fn override_file_content(&mut self, file: FileId, content: Option<Arc<str>>)
Overrides file content. None value removes the override.
Source§fn set_crate_config(&mut self, crt: CrateId, root: Option<CrateConfiguration>)
fn set_crate_config(&mut self, crt: CrateId, root: Option<CrateConfiguration>)
Sets the root directory of the crate. None value removes the crate.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more