#[non_exhaustive]pub enum ColorError {
Layout(LayoutError),
AlphaLayoutMismatch,
ColorLayoutMismatch,
NarrowRangeRequiresInteger,
HlgDisplayRequiresBt2020Full,
InvalidIccProfile,
}Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Validation errors for PixelFormat and ColorSpace.
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.
Layout(LayoutError)
Underlying sample layout error.
AlphaLayoutMismatch
Alpha mode disagrees with whether the layout has an alpha or padding channel.
ColorLayoutMismatch
Color space variant disagrees with the layout’s channel family or sample type.
NarrowRangeRequiresInteger
Narrow studio range is only valid on U8 and U16 integer samples.
HlgDisplayRequiresBt2020Full
Display-rendered HLG requires full-range BT.2020 RGB/RGBA.
InvalidIccProfile
Attached ICC profile is empty, has a disallowed profile class (DeviceLink/Abstract/NamedColor), or its header data color space disagrees with the declared color model.
Trait Implementations§
Source§impl Clone for ColorError
impl Clone for ColorError
Source§fn clone(&self) -> ColorError
fn clone(&self) -> ColorError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColorError
Source§impl Debug for ColorError
impl Debug for ColorError
Source§impl Display for ColorError
impl Display for ColorError
impl Eq for ColorError
Source§impl Error for ColorError
impl Error for ColorError
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<ColorError> for BufferError
impl From<ColorError> for BufferError
Source§fn from(e: ColorError) -> BufferError
fn from(e: ColorError) -> BufferError
Converts to this type from the input type.
Source§impl From<ColorError> for ConvertError
impl From<ColorError> for ConvertError
Source§fn from(e: ColorError) -> Self
fn from(e: ColorError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ColorError
impl PartialEq for ColorError
impl StructuralPartialEq for ColorError
Auto Trait Implementations§
impl Freeze for ColorError
impl RefUnwindSafe for ColorError
impl Send for ColorError
impl Sync for ColorError
impl Unpin for ColorError
impl UnsafeUnpin for ColorError
impl UnwindSafe for ColorError
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