pub enum FetchResolution {
Opened {
representation: Representation,
plaintext: Vec<u8>,
},
Fetched {
representation: Representation,
bytes: Vec<u8>,
},
ReferencesOriginal {
representation: Representation,
},
Degraded {
shown: Representation,
reason: DegradeReason,
},
Pending {
shown: Representation,
},
}Expand description
The resolution of an on-demand open.
Variants§
Opened
A thumbnail or preview was fetched, integrity-verified, and decrypted.
Fields
representation: RepresentationWhich representation landed.
Fetched
The original was fetched. Its bytes stay ciphertext: the original opens through its
signed AssetManifest (which may carry a wrapped file key), not through this module.
Fields
representation: RepresentationWhich representation landed (always Representation::Original).
ReferencesOriginal
The tier’s signed manifest carries the format = "original" sentinel: the tier
references the original rather than holding bytes of its own, so it is satisfied by
the original and nothing was fetched. Never a missing derivative.
Fields
representation: RepresentationThe representation that the original satisfies.
Degraded
The desired representation is unavailable; the asset is shown at the best locally-held representation instead. The asset’s metadata and index entry are untouched — nothing is removed.
Fields
shown: RepresentationThe representation shown instead (down to the always-present LQIP).
reason: DegradeReasonWhy.
Pending
The original has not landed yet (awaiting-original): show the badge at the
best-held representation, never a failure.
Fields
shown: RepresentationThe representation shown while awaiting the original.
Trait Implementations§
Source§impl Clone for FetchResolution
impl Clone for FetchResolution
Source§fn clone(&self) -> FetchResolution
fn clone(&self) -> FetchResolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FetchResolution
impl Debug for FetchResolution
impl Eq for FetchResolution
Source§impl PartialEq for FetchResolution
impl PartialEq for FetchResolution
Source§fn eq(&self, other: &FetchResolution) -> bool
fn eq(&self, other: &FetchResolution) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FetchResolution
Auto Trait Implementations§
impl Freeze for FetchResolution
impl RefUnwindSafe for FetchResolution
impl Send for FetchResolution
impl Sync for FetchResolution
impl Unpin for FetchResolution
impl UnsafeUnpin for FetchResolution
impl UnwindSafe for FetchResolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more