pub struct SidecarEnrichment {
pub capture_time: Option<Timestamp>,
pub gps: Option<Gps>,
pub caption: Option<String>,
pub rating: Option<u8>,
pub tags: Vec<String>,
}Expand description
Out-of-band metadata a third-party source adapter folded for one media file, in the shape the signed sidecar stores it.
The precedence rule is resolved in two places, and this type is what keeps the two halves apart:
capture_timeandgpsare fallbacks. The file’s own embedded EXIF wins wherever it yields a value; these are consulted only where it does not. Because the adapter already folded EXIF-over-exporter at extraction, the value carried here is the winner of that fold — so an EXIF capture time the write site cannot resolve to a UTC instant by itself (a floatingDateTimeOriginalcarrying no offset) still beats the exporter’s record instead of silently losing to it.caption,ratingandtagsare exporter-authoritative — constructs the file bytes never carried — so they are written unconditionally, stamped(now, device_id)like any other register write.
Every field left empty writes nothing, so an import carrying no exporter record produces a
sidecar byte-identical to a plain filesystem import’s. The provider-specific mapping that
fills this in lives in import::sidecar_enrichment.
Fields§
§capture_time: Option<Timestamp>The adapter’s folded capture time — used only when the file’s own EXIF resolves none.
gps: Option<Gps>The adapter’s folded GPS fix — used only when the file’s own EXIF carries none.
caption: Option<String>The exporter’s user-typed description, bounded to the schema’s caption limit.
rating: Option<u8>The exporter’s favorite/star flag, already mapped onto the sidecar’s star scale.
Exporter-authoritative user tags (Takeout’s album membership); each becomes one
tags_user OR-set add with its own add_id, after the label rule
(normalize_label); a tag the rule refuses is
dropped and the import proceeds.
Trait Implementations§
Source§impl Clone for SidecarEnrichment
impl Clone for SidecarEnrichment
Source§fn clone(&self) -> SidecarEnrichment
fn clone(&self) -> SidecarEnrichment
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 SidecarEnrichment
impl Debug for SidecarEnrichment
Source§impl Default for SidecarEnrichment
impl Default for SidecarEnrichment
Source§fn default() -> SidecarEnrichment
fn default() -> SidecarEnrichment
Source§impl PartialEq for SidecarEnrichment
impl PartialEq for SidecarEnrichment
Source§fn eq(&self, other: &SidecarEnrichment) -> bool
fn eq(&self, other: &SidecarEnrichment) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SidecarEnrichment
Auto Trait Implementations§
impl Freeze for SidecarEnrichment
impl RefUnwindSafe for SidecarEnrichment
impl Send for SidecarEnrichment
impl Sync for SidecarEnrichment
impl Unpin for SidecarEnrichment
impl UnsafeUnpin for SidecarEnrichment
impl UnwindSafe for SidecarEnrichment
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> 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