#[non_exhaustive]pub enum Error {
Show 17 variants
Stopped(StopReason),
InvalidDimensions(u32, u32),
DimensionMismatch {
hdr_w: u32,
hdr_h: u32,
sdr_w: u32,
sdr_h: u32,
},
UnsupportedFormat(PixelFormat),
MissingInput(&'static str),
InvalidMetadata(String),
NotUltraHdr,
XmpParse(String),
IsoParse(String),
MpfParse(String),
LimitExceeded(String),
InvalidPixelData(String),
AllocationFailed(usize),
JpegEncode(String),
JpegDecode(String),
EncodeError(String),
DecodeError(String),
}Expand description
Errors that can occur during Ultra HDR operations.
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.
Stopped(StopReason)
Operation was stopped via cooperative cancellation.
InvalidDimensions(u32, u32)
Image dimensions are invalid (zero or too large).
DimensionMismatch
HDR and SDR images have different dimensions.
Fields
UnsupportedFormat(PixelFormat)
The pixel format is not supported for this operation.
MissingInput(&'static str)
A required input (HDR image, SDR image, etc.) was not provided.
InvalidMetadata(String)
Gain map metadata is invalid or malformed.
NotUltraHdr
The input is not an Ultra HDR image.
XmpParse(String)
XMP metadata parsing failed.
IsoParse(String)
ISO 21496-1 metadata parsing failed.
MpfParse(String)
Multi-Picture Format parsing failed.
LimitExceeded(String)
Input exceeds safety limits.
InvalidPixelData(String)
Pixel data is invalid or corrupted.
AllocationFailed(usize)
Allocation failed.
JpegEncode(String)
JPEG encoding failed.
JpegDecode(String)
JPEG decoding failed.
EncodeError(String)
General encoding error.
DecodeError(String)
General decoding error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<StopReason> for Error
impl From<StopReason> for Error
Source§fn from(reason: StopReason) -> Error
fn from(reason: StopReason) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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