pub trait FilesGroup: Database + HasQueryGroup<FilesDatabase> {
Show 24 methods // Required methods fn intern_crate(&self, key0: CrateLongId) -> CrateId; fn lookup_intern_crate(&self, key0: CrateId) -> CrateLongId; fn intern_file(&self, key0: FileLongId) -> FileId; fn lookup_intern_file(&self, key0: FileId) -> FileLongId; fn intern_flag(&self, key0: FlagLongId) -> FlagId; fn lookup_intern_flag(&self, key0: FlagId) -> FlagLongId; fn crate_roots(&self) -> Arc<HashMap<CrateId, Directory>>; fn set_crate_roots(&mut self, value__: Arc<HashMap<CrateId, Directory>>); fn set_crate_roots_with_durability( &mut self, value__: Arc<HashMap<CrateId, Directory>>, durability__: Durability ); fn file_overrides(&self) -> Arc<HashMap<FileId, Arc<String>>>; fn set_file_overrides(&mut self, value__: Arc<HashMap<FileId, Arc<String>>>); fn set_file_overrides_with_durability( &mut self, value__: Arc<HashMap<FileId, Arc<String>>>, durability__: Durability ); fn flags(&self) -> Arc<HashMap<FlagId, Arc<Flag>>>; fn set_flags(&mut self, value__: Arc<HashMap<FlagId, Arc<Flag>>>); fn set_flags_with_durability( &mut self, value__: Arc<HashMap<FlagId, Arc<Flag>>>, durability__: Durability ); fn cfg_set(&self) -> Arc<CfgSet>; fn set_cfg_set(&mut self, value__: Arc<CfgSet>); fn set_cfg_set_with_durability( &mut self, value__: Arc<CfgSet>, durability__: Durability ); fn crates(&self) -> Vec<CrateId>; fn crate_root_dir(&self, key0: CrateId) -> Option<Directory>; fn priv_raw_file_content(&self, key0: FileId) -> Option<Arc<String>>; fn file_content(&self, key0: FileId) -> Option<Arc<String>>; fn file_summary(&self, key0: FileId) -> Option<Arc<FileSummary>>; fn get_flag(&self, key0: FlagId) -> Option<Arc<Flag>>;
}

Required Methods§

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Main input of the project. Lists all the crates.

source

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

Set the value of the crate_roots input.

See crate_roots for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

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

Set the value of the crate_roots input and promise that its value will never change again.

See crate_roots for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

fn file_overrides(&self) -> Arc<HashMap<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<HashMap<FileId, Arc<String>>>)

Set the value of the file_overrides input.

See file_overrides for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

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

Set the value of the file_overrides input and promise that its value will never change again.

See file_overrides for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

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

The compilation flags.

source

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

Set the value of the flags input.

See flags for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

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

Set the value of the flags input and promise that its value will never change again.

See flags for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

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.

See cfg_set for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

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.

See cfg_set for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

source

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

List of crates in the project.

source

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

Root directory of the crate.

source

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

Query for raw file contents. Private.

source

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

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

source

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

source

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

Query to get a compilation flag by its ID.

Trait Implementations§

source§

impl AsFilesGroupMut for dyn FilesGroup

source§

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

source§

impl Upcast<dyn FilesGroup + 'static> for FilesDatabaseForTesting

source§

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

Implementors§

source§

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