#[non_exhaustive]pub enum LayoutError {
InvalidChannelCount,
InvalidBitDepth,
UnsupportedBitPacking,
NonCanonicalBitPacking,
InvalidSubsampling,
GeometryOverflow,
}Expand description
Layout validation or stride computation error.
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.
InvalidChannelCount
Channel count is zero or exceeds the supported maximum.
InvalidBitDepth
Bit depth or shift exceeds the underlying sample word.
UnsupportedBitPacking
Bit packing is not supported for the chosen SampleType.
NonCanonicalBitPacking
Bit packing is redundant with a canonical variant (e.g. Shifted with bits + shift == sample.bits(), which must use Msb).
InvalidSubsampling
Plane subsampling divisor is zero.
GeometryOverflow
Stride or byte-size computation overflowed usize.
Trait Implementations§
Source§impl Clone for LayoutError
impl Clone for LayoutError
Source§fn clone(&self) -> LayoutError
fn clone(&self) -> LayoutError
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 LayoutError
Source§impl Debug for LayoutError
impl Debug for LayoutError
Source§impl Display for LayoutError
impl Display for LayoutError
impl Eq for LayoutError
Source§impl Error for LayoutError
impl Error for LayoutError
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<LayoutError> for BufferError
impl From<LayoutError> for BufferError
Source§fn from(e: LayoutError) -> BufferError
fn from(e: LayoutError) -> BufferError
Converts to this type from the input type.
Source§impl From<LayoutError> for ConvertError
impl From<LayoutError> for ConvertError
Source§fn from(e: LayoutError) -> Self
fn from(e: LayoutError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LayoutError
impl PartialEq for LayoutError
impl StructuralPartialEq for LayoutError
Auto Trait Implementations§
impl Freeze for LayoutError
impl RefUnwindSafe for LayoutError
impl Send for LayoutError
impl Sync for LayoutError
impl Unpin for LayoutError
impl UnsafeUnpin for LayoutError
impl UnwindSafe for LayoutError
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