workspacer_workspace/
validate_integrity.rs

1// ---------------- [ File: workspacer-workspace/src/validate_integrity.rs ]
2crate::ix!();
3
4#[async_trait]
5impl<P, H> ValidateIntegrity for Workspace<P, H>
6where
7    H: CrateHandleInterface<P>,
8    // We still need P: ... 'async_trait, but we specifically DO NOT require `'static` for H.
9    for<'async_trait> P: From<PathBuf> + AsRef<Path> + Send + Sync + 'async_trait,
10{
11    type Error = WorkspaceError;
12
13    async fn validate_integrity(&self) -> Result<(), Self::Error> {
14        trace!("Starting Workspace::validate_integrity without forcing 'static on H");
15        for crate_arc in self.crates() {
16            trace!("Locking one crate_arc in async block to validate integrity");
17            let guard = crate_arc.lock().await;
18            guard.validate_integrity().await?;
19        }
20        Ok(())
21    }
22}