pub struct CallResolver<'a> { /* private fields */ }Implementations§
Source§impl<'a> CallResolver<'a>
impl<'a> CallResolver<'a>
pub fn new(call_graph: &'a CallGraph, current_file: &'a PathBuf) -> Self
Sourcepub fn resolve_call(&self, call: &UnresolvedCall) -> Option<FunctionId>
pub fn resolve_call(&self, call: &UnresolvedCall) -> Option<FunctionId>
Resolve an unresolved call to a concrete function - now O(1) lookup!
Sourcepub fn resolve_function_call(
all_functions: &[FunctionId],
callee_name: &str,
current_file: &PathBuf,
same_file_hint: bool,
) -> Option<FunctionId>
pub fn resolve_function_call( all_functions: &[FunctionId], callee_name: &str, current_file: &PathBuf, same_file_hint: bool, ) -> Option<FunctionId>
Pure function to resolve a function call against a list of candidates This is the core resolution logic extracted as a pure function
Sourcepub fn normalize_path_prefix(name: &str) -> String
pub fn normalize_path_prefix(name: &str) -> String
Normalize path prefixes in function names
Sourcepub fn is_function_match(
func: &FunctionId,
normalized_name: &str,
original_name: &str,
) -> bool
pub fn is_function_match( func: &FunctionId, normalized_name: &str, original_name: &str, ) -> bool
Pure function to check if a function matches the given name Simplified logic with clear precedence
Sourcepub fn extract_impl_type_from_caller(caller_name: &str) -> Option<String>
pub fn extract_impl_type_from_caller(caller_name: &str) -> Option<String>
Extract impl type from a caller function name
Sourcepub fn classify_call_type(name: &str) -> CallType
pub fn classify_call_type(name: &str) -> CallType
Classify the type of a function call
Sourcepub fn resolve_self_type(
name: &str,
current_impl_type: &Option<String>,
) -> String
pub fn resolve_self_type( name: &str, current_impl_type: &Option<String>, ) -> String
Resolve self type references
Sourcepub fn is_same_file_call(name: &str, current_impl_type: &Option<String>) -> bool
pub fn is_same_file_call(name: &str, current_impl_type: &Option<String>) -> bool
Check if this is likely a same-file call
Sourcepub fn is_self_receiver(receiver: &Expr) -> bool
pub fn is_self_receiver(receiver: &Expr) -> bool
Check if an expression is a self receiver
Auto Trait Implementations§
impl<'a> Freeze for CallResolver<'a>
impl<'a> RefUnwindSafe for CallResolver<'a>
impl<'a> Send for CallResolver<'a>
impl<'a> Sync for CallResolver<'a>
impl<'a> Unpin for CallResolver<'a>
impl<'a> UnwindSafe for CallResolver<'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
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