pub struct CallGraph<'tcx> {
pub nodes: FxIndexMap<NodeKey<'tcx>, Node<'tcx>>,
pub callers: UnordMap<NodeKey<'tcx>, Vec<NodeKey<'tcx>>>,
}Fields§
§nodes: FxIndexMap<NodeKey<'tcx>, Node<'tcx>>§callers: UnordMap<NodeKey<'tcx>, Vec<NodeKey<'tcx>>>Implementations§
Source§impl<'tcx> CallGraph<'tcx>
impl<'tcx> CallGraph<'tcx>
pub fn new(nodes: FxIndexMap<NodeKey<'tcx>, Node<'tcx>>) -> Self
Sourcepub fn resolved_callee(
&self,
caller: DefId,
location: Location,
) -> Option<NodeKey<'tcx>>
pub fn resolved_callee( &self, caller: DefId, location: Location, ) -> Option<NodeKey<'tcx>>
The callee node resolved for the Call terminator at location in the body of caller.
Returns None for call sites that did not resolve to a concrete node (unresolved trait
calls, dynamic dispatch) or whose body is not in the graph.
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> Freeze for CallGraph<'tcx>
impl<'tcx> !RefUnwindSafe for CallGraph<'tcx>
impl<'tcx> Send for CallGraph<'tcx>
impl<'tcx> Sync for CallGraph<'tcx>
impl<'tcx> Unpin for CallGraph<'tcx>
impl<'tcx> !UnwindSafe for CallGraph<'tcx>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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