Skip to main content

resolve_default_album

Function resolve_default_album 

Source
pub fn resolve_default_album(
    context: &DefaultAlbumContext,
) -> Result<ResolvedAlbum, DefaultAlbumError>
Expand description

Resolve the destination album for an import, first match wins (SSoT: Organization — The Default Album).

  1. the explicit user pick at import time,
  2. (post-v1: the scope_id override row, then the per-source-kind default row),
  3. the owner’s default_album_id pointer,
  4. the derived de facto album.

Deterministic by construction — a pure function of the context, with no clock, no I/O and no iteration order — and the fired ResolutionRule travels with the answer.