pub enum DctError {
NotJpeg,
Truncated,
CorruptEntropy,
Unsupported(String),
Missing(String),
Incompatible(String),
}Expand description
Errors returned by this crate.
Variants§
NotJpeg
The input does not start with a JPEG SOI marker (0xFF 0xD8).
Truncated
The input was truncated mid-marker or mid-entropy-stream.
CorruptEntropy
The entropy-coded data contains an invalid Huffman symbol or an unexpected structure.
Unsupported(String)
The JPEG uses a feature this crate does not support (e.g. progressive scan, lossless, or arithmetic coding).
Missing(String)
A required marker or table is missing from the JPEG (e.g. no SOF, no SOS, or a scan references a Huffman table that was not defined).
Incompatible(String)
The JpegCoefficients passed to write_coefficients is not
compatible with the JPEG (wrong number of components, wrong block
count, wrong component index).
Trait Implementations§
Source§impl Error for DctError
impl Error for DctError
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()
Auto Trait Implementations§
impl Freeze for DctError
impl RefUnwindSafe for DctError
impl Send for DctError
impl Sync for DctError
impl Unpin for DctError
impl UnsafeUnpin for DctError
impl UnwindSafe for DctError
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