Skip to main content

open_representation

Function open_representation 

Source
pub async fn open_representation<S, K, H>(
    source: &S,
    asset: &AssetBlobs,
    desired: Representation,
    locally_held: &BTreeSet<Representation>,
    keys: &K,
    on_authorization_change: H,
) -> FetchResolution
where S: BlobSource, K: AmkSource, H: AsyncFnMut(),
Expand description

Fetch desired for an asset, applying the degrade ladder on failure.

Before any byte moves, a thumbnail or preview is resolved against its signed manifest in AssetBlobs::derivative_manifests:

Then the blob is fetched:

The degrade target is best_available over locally_held, so it steps down preview → thumbnail → LQIP. The asset’s metadata / index entry is never removed — degrade only changes what is shown.