pub struct CrossProjectIndex {
pub projects: Vec<ProjectEntry>,
pub call_sites: HashMap<String, Vec<CallSite>>,
pub binding_refs: HashMap<String, Vec<BindingRef>>,
pub kaizen_refs: HashMap<String, Vec<KaizenRef>>,
pub commit_refs: HashMap<String, Vec<CommitRef>>,
}Expand description
Cross-project index aggregating all contract references across the stack.
Fields§
§projects: Vec<ProjectEntry>§call_sites: HashMap<String, Vec<CallSite>>§binding_refs: HashMap<String, Vec<BindingRef>>§kaizen_refs: HashMap<String, Vec<KaizenRef>>§commit_refs: HashMap<String, Vec<CommitRef>>Implementations§
Source§impl CrossProjectIndex
impl CrossProjectIndex
Sourcepub fn build(contracts_repo_root: &Path) -> Self
pub fn build(contracts_repo_root: &Path) -> Self
Build a cross-project index by discovering sibling projects.
Starts from contracts_repo_root (the provable-contracts repo),
walks ../ for sibling projects with Cargo.toml, and scans them
for contract references.
Sourcepub fn build_with_extra(
contracts_repo_root: &Path,
extra_path: Option<&Path>,
) -> Self
pub fn build_with_extra( contracts_repo_root: &Path, extra_path: Option<&Path>, ) -> Self
Build with an optional extra project path to include.
Sourcepub fn call_sites_for(&self, stem: &str) -> &[CallSite]
pub fn call_sites_for(&self, stem: &str) -> &[CallSite]
Get all call sites for a given contract stem.
Sourcepub fn binding_refs_for(&self, stem: &str) -> &[BindingRef]
pub fn binding_refs_for(&self, stem: &str) -> &[BindingRef]
Get all binding references for a given contract stem.
Sourcepub fn kaizen_refs_for(&self, pattern: &str) -> &[KaizenRef]
pub fn kaizen_refs_for(&self, pattern: &str) -> &[KaizenRef]
Get all KAIZEN references for a given pattern.
Sourcepub fn commit_refs_for(&self, pattern: &str) -> &[CommitRef]
pub fn commit_refs_for(&self, pattern: &str) -> &[CommitRef]
Get all commit message references for a given pattern.
Sourcepub fn total_call_sites(&self) -> usize
pub fn total_call_sites(&self) -> usize
Total call sites across all contracts.
Sourcepub fn project_count(&self) -> usize
pub fn project_count(&self) -> usize
Total projects discovered.
Trait Implementations§
Source§impl Clone for CrossProjectIndex
impl Clone for CrossProjectIndex
Source§fn clone(&self) -> CrossProjectIndex
fn clone(&self) -> CrossProjectIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CrossProjectIndex
impl Debug for CrossProjectIndex
Source§impl<'de> Deserialize<'de> for CrossProjectIndex
impl<'de> Deserialize<'de> for CrossProjectIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CrossProjectIndex
impl RefUnwindSafe for CrossProjectIndex
impl Send for CrossProjectIndex
impl Sync for CrossProjectIndex
impl Unpin for CrossProjectIndex
impl UnsafeUnpin for CrossProjectIndex
impl UnwindSafe for CrossProjectIndex
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