pub trait Db: Database {
// Required methods
fn file_text(&self, file: FileId) -> Option<FileText>;
fn engine(&self) -> Option<&'static EngineApi>;
fn source_root(&self) -> Option<SourceRoot>;
fn project_config(&self) -> Option<ProjectConfig>;
fn warning_override(&self) -> WarningOverride;
}Required Methods§
Sourcefn file_text(&self, file: FileId) -> Option<FileText>
fn file_text(&self, file: FileId) -> Option<FileText>
The text input for file, or None if no text has been set for it.
Sourcefn engine(&self) -> Option<&'static EngineApi>
fn engine(&self) -> Option<&'static EngineApi>
The bundled engine model, or None on wasm32 (no embedded blob — the host wires the
fetched blob in via EngineApi::from_bytes in Phase 5).
Sourcefn source_root(&self) -> Option<SourceRoot>
fn source_root(&self) -> Option<SourceRoot>
The project’s file set, or None before any file has been applied. Project-wide queries
(the global class_name registry) take this as their salsa-tracked input.
Sourcefn project_config(&self) -> Option<ProjectConfig>
fn project_config(&self) -> Option<ProjectConfig>
The project’s project.godot config, or None in single-file mode. The autoload registry
(M4) takes this as its salsa-tracked input.
Sourcefn warning_override(&self) -> WarningOverride
fn warning_override(&self) -> WarningOverride
The host-level warning-strictness override (default WarningOverride::None). A plain
field, NOT a salsa input — read only by the downstream gate, so it never re-runs inference.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".