pub fn single_repository_ref(
spec: &SnapshotPolicySpec,
) -> Result<&RepositoryRef, ValidationError>Expand description
The single repository a policy targets, for code paths that genuinely cannot take a multi-repository policy.
The multi-repo arm returns
ValidationError::PolicySingleRepositoryRequired
so a consumer that needs “the one repository” fails LOUDLY instead of silently picking
repository #1. Multi-repo policies address per-repository work through
each child Snapshot’s spec.repository pin
(crate::snapshot::effective_repository_ref); callers that can handle
both shapes should match policy_repositories instead. Callers that
treat multi as “no single answer” (e.g. the restore readiness gate’s
non-fatal repository lookup) .ok() this deliberately.