pub struct RubyGraphSource<'a> {
pub index: &'a dyn CodeUnitIndex,
pub definitions: &'a DefinitionLookupAccess<'a>,
}Expand description
The dispatching analyzer’s side of a Ruby usage-graph scan.
Deliberately not the Ruby analyzer, for the reason recorded on
PythonGraphSource: in a mixed workspace the query is issued against a
MultiAnalyzer, whose definitions merges every language’s shards and whose
enclosing-unit lookup crosses language boundaries. The walks depend on that
reach, so this stays separate from the
RubySource that answers the Ruby-only
questions.
definitions is a callback rather than a handle because the analyzer’s
global definition index is built lazily on first access and only the
factory-return inference in extractor reaches it; the diagnostics pass
builds a resolver::RubySemanticIndex and never touches it at all, so
returning a handle would force the build there too.
Fields§
§index: &'a dyn CodeUnitIndex§definitions: &'a DefinitionLookupAccess<'a>Trait Implementations§
Source§impl<'a> Clone for RubyGraphSource<'a>
impl<'a> Clone for RubyGraphSource<'a>
Source§fn clone(&self) -> RubyGraphSource<'a>
fn clone(&self) -> RubyGraphSource<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for RubyGraphSource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RubyGraphSource<'a>
impl<'a> !UnwindSafe for RubyGraphSource<'a>
impl<'a> Freeze for RubyGraphSource<'a>
impl<'a> Send for RubyGraphSource<'a>
impl<'a> Sync for RubyGraphSource<'a>
impl<'a> Unpin for RubyGraphSource<'a>
impl<'a> UnsafeUnpin for RubyGraphSource<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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