Skip to main content

batch_fetch_plans

Function batch_fetch_plans 

Source
pub fn batch_fetch_plans(
    refs: &[Ref],
    store_root: &Utf8Path,
) -> Result<Vec<(Ref, FetchPlan)>, FetchError>
Expand description

Dry-run preview for a batch — one FetchPlan per ref. Enforces the same MAX_BATCH_REFS cap batch_fetch does.

Returns Err(FetchError::TooManyRefs) when over the cap, or Err(FetchError::SourceSchema) if the dry-run allowlist invariant has drifted (issue #156 ②: this now propagates as a typed error via try_build_fetch_plan rather than silently emitting an empty candidate_hosts list — the signature already returned Result, so this is an in-crate behavior tightening with no caller-visible type change). Otherwise Ok(Vec<(Ref, FetchPlan)>) parallel to the input order.