pub enum Jb2Error {
Truncated,
BadHeaderFlag,
InheritedDictTooLarge,
MissingSharedDict,
ImageTooLarge,
EmptyDictReference,
InvalidSymbolIndex,
UnknownRecordType,
UnexpectedDictRecordType,
ZpInitFailed,
TooManyRecords,
}Expand description
JB2 bitonal image decoding errors.
Variants§
Truncated
Input ended before the JB2 stream was complete.
BadHeaderFlag
A flag bit in the image/dict header was set when it must be zero.
InheritedDictTooLarge
The inherited dictionary length exceeds the shared dictionary size.
The stream references a shared dictionary but none was provided.
ImageTooLarge
Image dimensions exceed the safety limit (~64M pixels).
EmptyDictReference
A record references a dictionary symbol but the dictionary is empty.
InvalidSymbolIndex
A decoded symbol index is out of range for the current dictionary.
UnknownRecordType
An unrecognized record type was encountered in the image stream.
UnexpectedDictRecordType
An unexpected record type was encountered in a dictionary stream.
ZpInitFailed
The ZP arithmetic coder could not be initialized (insufficient input).
TooManyRecords
Stream contains more records than the safety limit allows.
Trait Implementations§
Source§impl Error for Jb2Error
impl Error for Jb2Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Jb2Error> for RenderError
impl From<Jb2Error> for RenderError
impl Eq for Jb2Error
impl StructuralPartialEq for Jb2Error
Auto Trait Implementations§
impl Freeze for Jb2Error
impl RefUnwindSafe for Jb2Error
impl Send for Jb2Error
impl Sync for Jb2Error
impl Unpin for Jb2Error
impl UnsafeUnpin for Jb2Error
impl UnwindSafe for Jb2Error
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more