pub struct BatchMetadataUpdate { /* private fields */ }Expand description
Builder for applying a uniform set of metadata tag changes to multiple files.
Chain builder calls to configure the target files and tags, then call
apply to execute the batch. One error in a single file does not abort
the remaining files; all results are collected and returned as a BatchResult.
Implementations§
Source§impl BatchMetadataUpdate
impl BatchMetadataUpdate
Sourcepub fn set_tag(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn set_tag(self, key: impl Into<String>, value: impl Into<String>) -> Self
Schedules a tag key → value write for every target file.
If the same key is added more than once, the last value wins.
Sourcepub fn copy_from(self, source: impl AsRef<Path>, keys: Vec<String>) -> Self
pub fn copy_from(self, source: impl AsRef<Path>, keys: Vec<String>) -> Self
Configures the update to also copy specific tags from source into
each target file before applying the explicit set_tag entries.
When a key appears in both source and the explicit tags, the
explicit value wins.
Sourcepub fn apply(self) -> BatchResult
pub fn apply(self) -> BatchResult
Executes the batch update and returns a BatchResult.
Each file is processed independently; a failure on one file does not abort the remaining files.