pub enum JpegError {
UnexpectedEof,
InvalidSoi,
MissingEoi,
UnsupportedMarker(u8),
InvalidMarkerData(&'static str),
HuffmanDecode,
InvalidQuantTableId(u8),
InvalidHuffmanTableId(u8),
UnknownComponentId(u8),
InvalidDimensions,
UnsupportedPrecision(u8),
}Expand description
Errors that can occur during JPEG parsing or encoding.
Variants§
UnexpectedEof
Input data is too short or truncated.
InvalidSoi
Missing SOI (0xFFD8) at start of data.
MissingEoi
Missing EOI (0xFFD9) — non-fatal for some files.
UnsupportedMarker(u8)
Encountered an unsupported JPEG marker (progressive, arithmetic, etc.).
InvalidMarkerData(&'static str)
A marker segment has invalid or inconsistent length/content.
HuffmanDecode
Huffman decode error (invalid code encountered in scan data).
InvalidQuantTableId(u8)
Quantization table ID out of range (0–3).
InvalidHuffmanTableId(u8)
Huffman table ID out of range or missing.
UnknownComponentId(u8)
Component ID referenced in SOS not found in SOF.
InvalidDimensions
Image dimensions or sampling factors are invalid.
UnsupportedPrecision(u8)
12-bit precision is not supported.
Trait Implementations§
Source§impl Error for JpegError
impl Error for JpegError
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<JpegError> for StegoError
impl From<JpegError> for StegoError
impl Eq for JpegError
impl StructuralPartialEq for JpegError
Auto Trait Implementations§
impl Freeze for JpegError
impl RefUnwindSafe for JpegError
impl Send for JpegError
impl Sync for JpegError
impl Unpin for JpegError
impl UnsafeUnpin for JpegError
impl UnwindSafe for JpegError
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