pub trait RubySource:
CodeUnitIndex
+ TypeHierarchyProvider
+ ImportAnalysisProvider {
// Required methods
fn all_files(&self) -> Vec<ProjectFile>;
fn autoload_constant_files(&self) -> &HashMap<String, HashSet<ProjectFile>>;
fn has_zeitwerk_autoload_conventions(&self) -> bool;
fn zeitwerk_autoload_files(&self) -> &HashSet<ProjectFile>;
fn zeitwerk_consumer_files(&self) -> &HashSet<ProjectFile>;
fn zeitwerk_autoload_code_units(&self) -> &HashSet<CodeUnit>;
fn reverse_import_index(
&self,
) -> Arc<HashMap<ProjectFile, Arc<HashSet<ProjectFile>>>> ⓘ;
fn mixin_relations(&self) -> &[TypeRelation];
fn semantic_facts(&self) -> &RubySemanticFacts;
fn types_by_identifier(&self) -> &HashMap<String, Vec<CodeUnit>>;
fn method_dispatch_mode(&self, unit: &CodeUnit) -> RubyMethodDispatchMode;
fn forward_owner_relation_facts(
&self,
owner: &CodeUnit,
) -> Vec<RubyOwnerRelationFact>;
}Required Methods§
Sourcefn all_files(&self) -> Vec<ProjectFile>
fn all_files(&self) -> Vec<ProjectFile>
The analyzed live file set (TreeSitterAnalyzer::all_files).
Sourcefn autoload_constant_files(&self) -> &HashMap<String, HashSet<ProjectFile>>
fn autoload_constant_files(&self) -> &HashMap<String, HashSet<ProjectFile>>
Workspace-wide autoload :Const, "path" edges, keyed by the $-joined
constant name. Built by crate::imports::build_autoload_constant_files.
Sourcefn has_zeitwerk_autoload_conventions(&self) -> bool
fn has_zeitwerk_autoload_conventions(&self) -> bool
Whether Gemfile/Gemfile.lock declare rails or zeitwerk. Built by
crate::imports::detect_zeitwerk_autoload_conventions.
fn zeitwerk_autoload_files(&self) -> &HashSet<ProjectFile>
fn zeitwerk_consumer_files(&self) -> &HashSet<ProjectFile>
fn zeitwerk_autoload_code_units(&self) -> &HashSet<CodeUnit>
Sourcefn reverse_import_index(
&self,
) -> Arc<HashMap<ProjectFile, Arc<HashSet<ProjectFile>>>> ⓘ
fn reverse_import_index( &self, ) -> Arc<HashMap<ProjectFile, Arc<HashSet<ProjectFile>>>> ⓘ
required_files inverted over the whole workspace, memoized through the
analyzer’s PoolSafeMemo.
Sourcefn mixin_relations(&self) -> &[TypeRelation]
fn mixin_relations(&self) -> &[TypeRelation]
The resolved include/prepend/extend graph. Built by
crate::mixins::ruby_collect_mixin_relations.
Sourcefn semantic_facts(&self) -> &RubySemanticFacts
fn semantic_facts(&self) -> &RubySemanticFacts
Built by build_ruby_semantic_facts.
Sourcefn types_by_identifier(&self) -> &HashMap<String, Vec<CodeUnit>>
fn types_by_identifier(&self) -> &HashMap<String, Vec<CodeUnit>>
Class/module declarations indexed by trailing identifier. Built by
crate::hierarchy::build_ruby_types_by_identifier.
Sourcefn method_dispatch_mode(&self, unit: &CodeUnit) -> RubyMethodDispatchMode
fn method_dispatch_mode(&self, unit: &CodeUnit) -> RubyMethodDispatchMode
The persisted per-method dispatch mode, defaulting to Instance.
Sourcefn forward_owner_relation_facts(
&self,
owner: &CodeUnit,
) -> Vec<RubyOwnerRelationFact>
fn forward_owner_relation_facts( &self, owner: &CodeUnit, ) -> Vec<RubyOwnerRelationFact>
The decoded superclass and mixin relations declared by owner, read out
of the analyzer’s persisted per-file state. See this module’s note.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".