pub struct RubySemanticIndex<'a> {
pub graph: RubyGraphSource<'a>,
pub ruby: &'a dyn RubySource,
pub factory_return_cache: RefCell<HashMap<FactoryInferenceKey, Option<String>>>,
/* private fields */
}Fields§
§graph: RubyGraphSource<'a>§ruby: &'a dyn RubySource§factory_return_cache: RefCell<HashMap<FactoryInferenceKey, Option<String>>>Implementations§
Source§impl<'a> RubySemanticIndex<'a>
impl<'a> RubySemanticIndex<'a>
pub fn build( graph: RubyGraphSource<'a>, ruby: &'a dyn RubySource, spec: &RubyTargetSpec, ) -> Self
pub fn build_for_lookup( graph: RubyGraphSource<'a>, ruby: &'a dyn RubySource, ) -> Self
pub fn visible_files_from(&self, file: &ProjectFile) -> HashSet<ProjectFile>
Sourcepub fn visible_files_from_bounded(
&self,
file: &ProjectFile,
max_files: usize,
) -> Option<HashSet<ProjectFile>>
pub fn visible_files_from_bounded( &self, file: &ProjectFile, max_files: usize, ) -> Option<HashSet<ProjectFile>>
Follows only explicit project-local require edges and fails closed
when the dependency closure is too broad for a latency-sensitive caller.
Diagnostics use this instead of the navigation-oriented visibility
closure. Callers that want convention-derived Zeitwerk visibility must
continue using Self::visible_files_from.
pub fn resolve_constant( &self, file: &ProjectFile, visible_files: &HashSet<ProjectFile>, lexical_stack: &[String], node: Node<'_>, source: &str, ) -> Option<CodeUnit>
Sourcepub fn resolve_project_local_constant(
&self,
file: &ProjectFile,
visible_files: &HashSet<ProjectFile>,
lexical_stack: &[String],
node: Node<'_>,
source: &str,
) -> Option<CodeUnit>
pub fn resolve_project_local_constant( &self, file: &ProjectFile, visible_files: &HashSet<ProjectFile>, lexical_stack: &[String], node: Node<'_>, source: &str, ) -> Option<CodeUnit>
Resolves only indexed declarations in the supplied project-local
visibility closure. This avoids initializing the workspace-wide
autoload index for conservative, latency-sensitive diagnostics.
pub fn resolve_constant_name( &self, file: &ProjectFile, visible_files: &HashSet<ProjectFile>, lexical_stack: &[String], name: &str, ) -> Option<CodeUnit>
pub fn target_matches_constant(&self, unit: &CodeUnit) -> bool
pub fn resolve_method_candidates( &self, support: &dyn BoundedDefinitionLookup, visible_files: &HashSet<ProjectFile>, receiver: &ReceiverType, member: &str, ) -> Vec<CodeUnit>
pub fn resolve_bare_method_candidates( &self, support: &dyn BoundedDefinitionLookup, visible_files: &HashSet<ProjectFile>, receiver: &ReceiverType, member: &str, ) -> Vec<CodeUnit>
pub fn ancestor_lookup_order(&self, owner: &str) -> Vec<String>
pub fn forward_ancestor_lookup_order( &self, support: &dyn BoundedDefinitionLookup, visible_files: &[ProjectFile], owner: &str, ) -> Vec<String>
Auto Trait Implementations§
impl<'a> !Freeze for RubySemanticIndex<'a>
impl<'a> !RefUnwindSafe for RubySemanticIndex<'a>
impl<'a> !Sync for RubySemanticIndex<'a>
impl<'a> !UnwindSafe for RubySemanticIndex<'a>
impl<'a> Send for RubySemanticIndex<'a>
impl<'a> Unpin for RubySemanticIndex<'a>
impl<'a> UnsafeUnpin for RubySemanticIndex<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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