pub struct SidecarData {
pub version: u32,
pub media_path: PathBuf,
pub checksum: Option<Checksum>,
pub timecode: Option<SidecarTimecode>,
pub history: Vec<ProcessingRecord>,
pub proxies: HashMap<String, PathBuf>,
pub metadata: HashMap<String, String>,
pub integrity_verified: bool,
pub notes: String,
}Expand description
The main side-car data structure.
Fields§
§version: u32Side-car format version.
media_path: PathBufPath to the associated media file (relative or absolute).
checksum: Option<Checksum>File integrity checksum.
timecode: Option<SidecarTimecode>Timecode information.
history: Vec<ProcessingRecord>Processing history (most recent last).
proxies: HashMap<String, PathBuf>Proxy paths (spec name → proxy path).
metadata: HashMap<String, String>Arbitrary user/application metadata.
integrity_verified: boolWhether this file has been verified against its checksum.
notes: StringOptional editorial notes.
Implementations§
Source§impl SidecarData
impl SidecarData
Sourcepub fn set_checksum(&mut self, checksum: Checksum)
pub fn set_checksum(&mut self, checksum: Checksum)
Set the checksum.
Sourcepub fn set_timecode(&mut self, tc: SidecarTimecode)
pub fn set_timecode(&mut self, tc: SidecarTimecode)
Set timecode info.
Sourcepub fn add_proxy(&mut self, spec_name: impl Into<String>, path: PathBuf)
pub fn add_proxy(&mut self, spec_name: impl Into<String>, path: PathBuf)
Register a proxy path under a spec name.
Sourcepub fn add_history(&mut self, record: ProcessingRecord)
pub fn add_history(&mut self, record: ProcessingRecord)
Add a processing record to history.
Sourcepub fn set_metadata(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn set_metadata(&mut self, key: impl Into<String>, value: impl Into<String>)
Set a metadata key-value pair.
Sourcepub fn get_metadata(&self, key: &str) -> Option<&str>
pub fn get_metadata(&self, key: &str) -> Option<&str>
Get a metadata value by key.
Sourcepub fn proxy_count(&self) -> usize
pub fn proxy_count(&self) -> usize
Number of proxies registered.
Trait Implementations§
Source§impl Clone for SidecarData
impl Clone for SidecarData
Source§fn clone(&self) -> SidecarData
fn clone(&self) -> SidecarData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SidecarData
impl Debug for SidecarData
Source§impl<'de> Deserialize<'de> for SidecarData
impl<'de> Deserialize<'de> for SidecarData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SidecarData
impl RefUnwindSafe for SidecarData
impl Send for SidecarData
impl Sync for SidecarData
impl Unpin for SidecarData
impl UnsafeUnpin for SidecarData
impl UnwindSafe for SidecarData
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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