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

source

pub fn for_read(self) -> Self

Open for read-only access.

See kXMPFiles_OpenForRead constant in C++ SDK.

source

pub fn for_update(self) -> Self

Open for reading and writing.

See kXMPFiles_OpenForUpdate constant in C++ SDK.

source

pub fn only_xmp(self) -> Self

Only the XMP is wanted.

This allows space/time optimizations.

See kXMPFiles_OpenOnlyXMP constant in C++ SDK.

source

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.

source

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.

source

pub fn use_smart_handler(self) -> Self

Require the use of a smart handler.

See kXMPFiles_OpenUseSmartHandler constant in C++ SDK.

source

pub fn use_packet_scanning(self) -> Self

Force packet scanning.

Do not use a smart handler.

See kXMPFiles_OpenUsePacketScanning constant in C++ SDK.

source

pub fn limited_scanning(self) -> Self

Only packet scan files “known” to need scanning.

See kXMPFiles_OpenLimitedScanning constant in C++ SDK.

source

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.

source

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.

Trait Implementations§

source§

impl Default for OpenFileOptions

source§

fn default() -> OpenFileOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.