pub struct CallRelation {
pub caller_symbol_id: String,
pub callee_symbol_id: Option<String>,
pub callee_name: String,
pub callee_target_kind: CallTargetKind,
pub callee_external_module: Option<String>,
pub file_path: String,
pub line: usize,
}Expand description
Call relationship extracted from AST.
Fields§
§caller_symbol_id: String§callee_symbol_id: Option<String>§callee_name: String§callee_target_kind: CallTargetKind§callee_external_module: Option<String>§file_path: String§line: usizeImplementations§
Source§impl CallRelation
impl CallRelation
pub fn new( caller_symbol_id: String, callee_name: String, file_path: String, line: usize, ) -> Self
pub fn with_symbol_target(self, callee_symbol_id: String) -> Self
pub fn with_external_target( self, callee_name: String, callee_external_module: String, ) -> Self
Sourcepub fn with_local_import_target(
self,
callee_name: String,
candidate_files: Vec<String>,
) -> Self
pub fn with_local_import_target( self, callee_name: String, candidate_files: Vec<String>, ) -> Self
Mark this call as a pending cross-file local import. callee_name is the
originally imported name (not the local alias) and candidate_files are
the project-relative files the target symbol might live in, derived from
the import by pure path logic (no file reads). The post-write resolution
pass (index::indexer::local_imports) looks the target up in
code_symbols and rewrites this row to Symbol or Unresolved.
Candidate files ride in callee_external_module joined by \n; the
column is unused for local imports otherwise and is cleared on resolution.
JavaScript default imports prefix the list with an internal marker so
post-write resolution can use a unique top-level-symbol fallback while
unresolved calls still keep their source alias in callee_name.
pub fn with_local_default_import_target( self, callee_name: String, candidate_files: Vec<String>, ) -> Self
pub fn local_import_uses_default_export_fallback(&self) -> bool
Sourcepub fn local_import_candidate_files(&self) -> Vec<String>
pub fn local_import_candidate_files(&self) -> Vec<String>
Candidate target files carried by a LocalImport call, parsed back out of
callee_external_module. Empty for any other kind.
Trait Implementations§
Source§impl Clone for CallRelation
impl Clone for CallRelation
Source§fn clone(&self) -> CallRelation
fn clone(&self) -> CallRelation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CallRelation
impl RefUnwindSafe for CallRelation
impl Send for CallRelation
impl Sync for CallRelation
impl Unpin for CallRelation
impl UnsafeUnpin for CallRelation
impl UnwindSafe for CallRelation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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