pub struct CrossModuleAnalysis<'m> { /* private fields */ }Expand description
Analyzes multiple Modules, providing a ModuleAnalysis for each; and also
provides a few additional cross-module analyses (e.g., a cross-module call
graph)
Implementations§
Source§impl<'m> CrossModuleAnalysis<'m>
impl<'m> CrossModuleAnalysis<'m>
Sourcepub fn new(modules: impl IntoIterator<Item = &'m Module>) -> Self
pub fn new(modules: impl IntoIterator<Item = &'m Module>) -> Self
Create a new CrossModuleAnalysis for the given set of Modules.
This method itself is cheap; individual analyses will be computed lazily on demand.
Sourcepub fn modules<'s>(&'s self) -> impl Iterator<Item = &'m Module> + 's
pub fn modules<'s>(&'s self) -> impl Iterator<Item = &'m Module> + 's
Iterate over the analyzed Module(s).
Sourcepub fn functions<'s>(&'s self) -> impl Iterator<Item = &'m Function> + 's
pub fn functions<'s>(&'s self) -> impl Iterator<Item = &'m Function> + 's
Iterate over all the Functions in the analyzed Module(s).
Sourcepub fn call_graph(&self) -> Ref<'_, CallGraph<'m>>
pub fn call_graph(&self) -> Ref<'_, CallGraph<'m>>
Get the full CallGraph for the Module(s).
This will include both cross-module and within-module calls.
Sourcepub fn functions_by_type(&self) -> Ref<'_, FunctionsByType<'m>>
pub fn functions_by_type(&self) -> Ref<'_, FunctionsByType<'m>>
Get the FunctionsByType for the Module(s).
Sourcepub fn module_analysis<'s>(&'s self, mod_name: &str) -> &'s ModuleAnalysis<'m>
pub fn module_analysis<'s>(&'s self, mod_name: &str) -> &'s ModuleAnalysis<'m>
Get the ModuleAnalysis for the module with the given name.
Panics if no module of that name exists in the Module(s) which the
CrossModuleAnalysis was created with.
Auto Trait Implementations§
impl<'m> !Freeze for CrossModuleAnalysis<'m>
impl<'m> !RefUnwindSafe for CrossModuleAnalysis<'m>
impl<'m> Send for CrossModuleAnalysis<'m>
impl<'m> !Sync for CrossModuleAnalysis<'m>
impl<'m> Unpin for CrossModuleAnalysis<'m>
impl<'m> UnwindSafe for CrossModuleAnalysis<'m>
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