Skip to main content

build_artifact_caches_batch

Function build_artifact_caches_batch 

Source
pub fn build_artifact_caches_batch<E, F>(
    specs: &[LabeledArtifactCacheSpec],
    populate: F,
) -> Result<ArtifactCacheBatchReport<E>, ArtifactCacheBatchContractError>
Expand description

Build every independent caller-labeled artifact specification.

Labels must be nonempty and unique; the complete batch is rejected before work begins otherwise. The callback runs only for misses and receives the stable label plus one live transaction at a time. Sequential acquisition avoids self-deadlock when entries share a coordination scope. Every independent result is retained, and a callback error aborts and synchronously cleans that transaction before the next entry begins.

This operation is not atomic across specifications. A caller requiring one all-or-nothing multi-output publication should declare those outputs on one ArtifactCacheSpec instead.