Skip to main content

XmpErrorType

Enum XmpErrorType 

Source
#[non_exhaustive]
#[repr(i32)]
pub enum XmpErrorType {
Show 51 variants Unknown = 0, Tbd = 1, Unavailable = 2, BadObject = 3, BadParam = 4, BadValue = 5, AssertFailure = 6, EnforceFailure = 7, Unimplemented = 8, InternalFailure = 9, Deprecated = 10, ExternalFailure = 11, UserAbort = 12, StdException = 13, UnknownException = 14, NoMemory = 15, ProgressAbort = 16, BadSchema = 101, BadXPath = 102, BadOptions = 103, BadIndex = 104, BadIterPosition = 105, BadParse = 106, BadSerialize = 107, BadFileFormat = 108, NoFileHandler = 109, TooLargeForJpeg = 110, NoFile = 111, FilePermission = 112, DiskSpace = 113, ReadError = 114, WriteError = 115, BadBlockFormat = 116, FilePathNotAFile = 117, RejectedFileExtension = 118, BadXml = 201, BadRdf = 202, BadXmp = 203, EmptyIterator = 204, BadUnicode = 205, BadTiff = 206, BadJpeg = 207, BadPsd = 208, BadPsir = 209, BadIptc = 210, BadMpeg = 211, HeifConstructionMethodNotSupported = 212, BadPng = 213, NulInRustString = -432, NoCppToolkit = -433, XmpMetaElementMissing = -434,
}
Expand description

Describes which error type occurred.

Represents a specific error code from the underlying C++ XMP Toolkit.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unknown = 0

Generic unknown error.

§

Tbd = 1

Generic undefined error.

§

Unavailable = 2

Generic unavailable error.

§

BadObject = 3

Generic bad object error.

§

BadParam = 4

Generic bad parameter error.

§

BadValue = 5

Generic bad value error.

§

AssertFailure = 6

Generic assertion failure.

§

EnforceFailure = 7

Generic enforcement failure.

§

Unimplemented = 8

Generic unimplemented error.

§

InternalFailure = 9

Generic internal failure.

§

Deprecated = 10

Generic deprecated error.

§

ExternalFailure = 11

Generic external failure.

§

UserAbort = 12

Generic user abort error.

§

StdException = 13

Generic standard exception.

§

UnknownException = 14

Generic unknown exception.

§

NoMemory = 15

Generic out-of-memory error.

§

ProgressAbort = 16

Progress reporting callback requested abort.

§

BadSchema = 101

Bad schema parameter.

§

BadXPath = 102

Bad XPath parameter.

§

BadOptions = 103

Bad options parameter.

§

BadIndex = 104

Bad index parameter.

§

BadIterPosition = 105

Bad iteration position.

§

BadParse = 106

XML parsing error (deprecated).

§

BadSerialize = 107

Serialization error.

§

BadFileFormat = 108

File format error.

§

NoFileHandler = 109

No file handler found for format.

§

TooLargeForJpeg = 110

Data too large for JPEG file format.

§

NoFile = 111

A file does not exist.

§

FilePermission = 112

A file exists but cannot be opened.

§

DiskSpace = 113

A file write failed due to lack of disk space.

§

ReadError = 114

A file read failed.

§

WriteError = 115

A file write failed for a reason other than lack of disk space.

§

BadBlockFormat = 116

A block of a file is ill-formed, e.g. invalid IPTC-IIM in a photo.

§

FilePathNotAFile = 117

File path is not a file.

§

RejectedFileExtension = 118

Rejected file extension.

§

BadXml = 201

XML format error.

§

BadRdf = 202

RDF format error.

§

BadXmp = 203

XMP format error.

§

EmptyIterator = 204

Empty iterator.

§

BadUnicode = 205

Unicode error.

§

BadTiff = 206

TIFF format error.

§

BadJpeg = 207

JPEG format error.

§

BadPsd = 208

PSD format error.

§

BadPsir = 209

PSIR format error.

§

BadIptc = 210

IPTC format error.

§

BadMpeg = 211

MPEG format error.

§

HeifConstructionMethodNotSupported = 212

HEIF format: Modify Operation is not supported for Construction Method 1 or 2.

§

BadPng = 213

PNG format error.

§

NulInRustString = -432

Can not convert from Rust string to C string because a NUL byte was found.

§

NoCppToolkit = -433

C++ toolkit did not initialize properly.

§

XmpMetaElementMissing = -434

An x:xmpmeta wrapper was required, but not found.

This error can only occur if you call XmpMeta::from_str_with_options() with FromStrOptions::require_xmp_meta().

Trait Implementations§

Source§

impl Debug for XmpErrorType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for XmpErrorType

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for XmpErrorType

Source§

impl Error for XmpErrorType

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<i32> for XmpErrorType

Source§

fn from(number: i32) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for XmpErrorType

Source§

type Primitive = i32

Source§

fn from_primitive(number: Self::Primitive) -> Self

Source§

impl PartialEq for XmpErrorType

Source§

fn eq(&self, other: &XmpErrorType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for XmpErrorType

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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>,

Source§

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.