pub struct CallGraph<'a> { /* private fields */ }Expand description
调用图查询 — 在 KnowledgeGraph 上提供调用者/被调用者等查询
Implementations§
Source§impl<'a> CallGraph<'a>
impl<'a> CallGraph<'a>
pub fn new(graph: &'a KnowledgeGraph) -> Self
Sourcepub fn all_call_edges(&self) -> Vec<(NodeId, NodeId)>
pub fn all_call_edges(&self) -> Vec<(NodeId, NodeId)>
返回所有 Calls 边的列表
Sourcepub fn build_call_index(&self) -> CallIndex
pub fn build_call_index(&self) -> CallIndex
构建符号名 → (调用者列表, 被调用者列表) 预计算表。 一次性遍历所有 Calls 边,避免查询时重复扫描全图。
Auto Trait Implementations§
impl<'a> Freeze for CallGraph<'a>
impl<'a> RefUnwindSafe for CallGraph<'a>
impl<'a> Send for CallGraph<'a>
impl<'a> Sync for CallGraph<'a>
impl<'a> Unpin for CallGraph<'a>
impl<'a> UnsafeUnpin for CallGraph<'a>
impl<'a> UnwindSafe for CallGraph<'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> 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> ⓘ
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