Struct xmp_toolkit::OpenFileOptions
source · pub struct OpenFileOptions { /* private fields */ }
Expand description
Option flags for XmpFile::open_file
.
Invoke by calling OpenFileOptions::default
and then calling methods
on this struct to add options as needed.
Implementations§
source§impl OpenFileOptions
impl OpenFileOptions
sourcepub fn for_read(self) -> Self
pub fn for_read(self) -> Self
Open for read-only access.
See kXMPFiles_OpenForRead
constant in C++ SDK.
sourcepub fn for_update(self) -> Self
pub fn for_update(self) -> Self
Open for reading and writing.
See kXMPFiles_OpenForUpdate
constant in C++ SDK.
sourcepub fn only_xmp(self) -> Self
pub fn only_xmp(self) -> Self
Only the XMP is wanted.
This allows space/time optimizations.
See kXMPFiles_OpenOnlyXMP
constant in C++ SDK.
sourcepub fn force_given_handler(self) -> Self
pub fn force_given_handler(self) -> Self
Force use of the given handler (format).
Do not even verify the format.
See kXMPFiles_ForceGivenHandler
constant in C++ SDK.
sourcepub fn strict(self) -> Self
pub fn strict(self) -> Self
Be strict about only attempting to use the designated file handler.
Do not fall back to other handlers.
See kXMPFiles_OpenStrictly
constant in C++ SDK.
sourcepub fn use_smart_handler(self) -> Self
pub fn use_smart_handler(self) -> Self
Require the use of a smart handler.
See kXMPFiles_OpenUseSmartHandler
constant in C++ SDK.
sourcepub fn use_packet_scanning(self) -> Self
pub fn use_packet_scanning(self) -> Self
Force packet scanning.
Do not use a smart handler.
See kXMPFiles_OpenUsePacketScanning
constant in C++ SDK.
sourcepub fn limited_scanning(self) -> Self
pub fn limited_scanning(self) -> Self
Only packet scan files “known” to need scanning.
See kXMPFiles_OpenLimitedScanning
constant in C++ SDK.
sourcepub fn repair_file(self) -> Self
pub fn repair_file(self) -> Self
Attempt to repair a file opened for update.
Default is to not open (throw an exception).
See kXMPFiles_OpenRepairFile
constant in C++ SDK.
sourcepub fn optimize_file_layout(self) -> Self
pub fn optimize_file_layout(self) -> Self
When updating a file, spend the effort necessary to optimize file layout.
See kXMPFiles_OptimizeFileLayout
constant in C++ SDK.