pub struct CallGraphBuilder<'a> { /* private fields */ }Expand description
Builds a call graph by recursively tracing function calls
Implementations§
Source§impl<'a> CallGraphBuilder<'a>
impl<'a> CallGraphBuilder<'a>
Sourcepub fn new(
direction: TraceDirection,
max_depth: usize,
finder: &'a mut FunctionFinder,
extractor: &'a CallExtractor,
) -> Self
pub fn new( direction: TraceDirection, max_depth: usize, finder: &'a mut FunctionFinder, extractor: &'a CallExtractor, ) -> Self
Create a new CallGraphBuilder
§Arguments
direction- Whether to trace forward or backwardmax_depth- Maximum depth of the call treefinder- Service to find function definitionsextractor- Service to extract calls from code
Sourcepub fn build_trace(
&mut self,
start_fn: &FunctionDef,
) -> Result<Option<CallTree>>
pub fn build_trace( &mut self, start_fn: &FunctionDef, ) -> Result<Option<CallTree>>
Build a call trace tree starting from the given function
Auto Trait Implementations§
impl<'a> Freeze for CallGraphBuilder<'a>
impl<'a> RefUnwindSafe for CallGraphBuilder<'a>
impl<'a> Send for CallGraphBuilder<'a>
impl<'a> Sync for CallGraphBuilder<'a>
impl<'a> Unpin for CallGraphBuilder<'a>
impl<'a> !UnwindSafe for CallGraphBuilder<'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