cairo_lang_filesystem::db

Trait FilesGroup

Source
pub trait FilesGroup:
    Database
    + HasQueryGroup<FilesDatabase>
    + ExternalFiles {
Show 24 methods // Required methods 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; fn crate_configs(&self) -> Arc<OrderedHashMap<CrateId, CrateConfiguration>>; fn set_crate_configs( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, ); fn set_crate_configs_with_durability( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, durability__: Durability, ); fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<str>>>; fn set_file_overrides( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<str>>>, ); fn set_file_overrides_with_durability( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<str>>>, durability__: Durability, ); fn flags(&self) -> Arc<OrderedHashMap<FlagId, Arc<Flag>>>; fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>); fn set_flags_with_durability( &mut self, value__: Arc<OrderedHashMap<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_config(&self, crate_id: CrateId) -> Option<CrateConfiguration>; fn priv_raw_file_content(&self, file_id: FileId) -> Option<Arc<str>>; fn file_content(&self, file_id: FileId) -> Option<Arc<str>>; fn file_summary(&self, file_id: FileId) -> Option<Arc<FileSummary>>; fn get_flag(&self, id: FlagId) -> Option<Arc<Flag>>;
}

Required Methods§

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_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>>, )

Set the value of the crate_configs input.

See crate_configs 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_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.

See crate_configs 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<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>>>)

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

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

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

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

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_config(&self, crate_id: CrateId) -> Option<CrateConfiguration>

Configuration of the crate.

Source

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

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.

Trait Implementations§

Source§

impl AsFilesGroupMut for dyn FilesGroup

Source§

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

Source§

impl<'a> Intern<'a, dyn FilesGroup + 'a, CrateId> for CrateLongId

Source§

fn intern(self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized)) -> CrateId

Source§

impl<'a> Intern<'a, dyn FilesGroup + 'a, FileId> for FileLongId

Source§

fn intern(self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized)) -> FileId

Source§

impl<'a> Intern<'a, dyn FilesGroup + 'a, FlagId> for FlagLongId

Source§

fn intern(self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized)) -> FlagId

Source§

impl<'a> LookupIntern<'a, dyn FilesGroup + 'a, CrateLongId> for CrateId

Source§

fn lookup_intern( &self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized), ) -> CrateLongId

Source§

impl<'a> LookupIntern<'a, dyn FilesGroup + 'a, FileLongId> for FileId

Source§

fn lookup_intern( &self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized), ) -> FileLongId

Source§

impl<'a> LookupIntern<'a, dyn FilesGroup + 'a, FlagLongId> for FlagId

Source§

fn lookup_intern( &self, db: &(impl Upcast<dyn FilesGroup + 'a> + ?Sized), ) -> FlagLongId

Source§

impl Upcast<dyn FilesGroup> for FilesDatabaseForTesting

Source§

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

Implementors§

Source§

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