#[non_exhaustive]pub enum J2kCodestreamHeaderError {
TooShort {
need: usize,
have: usize,
},
TruncatedAt {
offset: usize,
segment: &'static str,
},
InvalidMarker {
offset: usize,
marker: u8,
},
MissingRequiredMarker {
marker: &'static str,
},
InvalidSegment {
offset: usize,
what: &'static str,
},
InvalidSiz {
what: &'static str,
},
InvalidCod {
what: &'static str,
},
Unsupported {
what: &'static str,
},
}Expand description
Error returned by inspect_j2k_codestream_header.
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.
TooShort
Input was shorter than the required prefix.
TruncatedAt
Input ended while reading a marker or marker segment.
Fields
InvalidMarker
A codestream marker did not start with 0xFF.
Fields
MissingRequiredMarker
A required codestream marker was absent.
InvalidSegment
A generic marker segment was malformed.
Fields
InvalidSiz
The SIZ marker segment was malformed or unsupported.
InvalidCod
The COD marker segment was malformed or unsupported.
Unsupported
The header is valid, but outside the public inspection contract.
Trait Implementations§
Source§impl Clone for J2kCodestreamHeaderError
impl Clone for J2kCodestreamHeaderError
Source§fn clone(&self) -> J2kCodestreamHeaderError
fn clone(&self) -> J2kCodestreamHeaderError
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 J2kCodestreamHeaderError
Source§impl Debug for J2kCodestreamHeaderError
impl Debug for J2kCodestreamHeaderError
Source§impl Display for J2kCodestreamHeaderError
impl Display for J2kCodestreamHeaderError
impl Eq for J2kCodestreamHeaderError
Source§impl PartialEq for J2kCodestreamHeaderError
impl PartialEq for J2kCodestreamHeaderError
Source§fn eq(&self, other: &J2kCodestreamHeaderError) -> bool
fn eq(&self, other: &J2kCodestreamHeaderError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for J2kCodestreamHeaderError
Auto Trait Implementations§
impl Freeze for J2kCodestreamHeaderError
impl RefUnwindSafe for J2kCodestreamHeaderError
impl Send for J2kCodestreamHeaderError
impl Sync for J2kCodestreamHeaderError
impl Unpin for J2kCodestreamHeaderError
impl UnsafeUnpin for J2kCodestreamHeaderError
impl UnwindSafe for J2kCodestreamHeaderError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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