#[non_exhaustive]pub enum EncodeError {
InvalidInput {
what: &'static str,
},
Unsupported {
what: &'static str,
},
ArithmeticOverflow {
what: &'static str,
},
AllocationTooLarge {
what: &'static str,
requested: usize,
cap: usize,
},
HostAllocationFailed {
what: &'static str,
bytes: usize,
},
Accelerator {
operation: &'static str,
source: J2kEncodeStageError,
},
CodestreamValidation {
detail: &'static str,
},
InternalInvariant {
what: &'static str,
},
}Expand description
Error returned by native JPEG 2000 and HTJ2K encode operations.
The variants deliberately keep resource failures distinct from malformed requests, accelerator failures, and generated-codestream validation. This lets facade and transcode callers preserve actionable failure categories without parsing display strings.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidInput
Caller-provided samples, geometry, metadata, or options are invalid.
Unsupported
The requested encode feature or shape is not implemented.
ArithmeticOverflow
Checked arithmetic overflowed while planning an encode phase.
AllocationTooLarge
Simultaneously live host allocations would exceed the shared cap.
Fields
HostAllocationFailed
The allocator could not reserve a checked, cap-valid host allocation.
Fields
Accelerator
An optional encode-stage accelerator accepted work but failed it.
Fields
source: J2kEncodeStageErrorStructured stage failure with an optional concrete backend source.
CodestreamValidation
A generated codestream failed the requested validation contract.
InternalInvariant
Internal encode state violated an invariant.
Trait Implementations§
Source§impl Debug for EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
impl Eq for EncodeError
Source§impl Error for EncodeError
impl Error for EncodeError
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 PartialEq for EncodeError
impl PartialEq for EncodeError
impl StructuralPartialEq for EncodeError
Auto Trait Implementations§
impl !RefUnwindSafe for EncodeError
impl !UnwindSafe for EncodeError
impl Freeze for EncodeError
impl Send for EncodeError
impl Sync for EncodeError
impl Unpin for EncodeError
impl UnsafeUnpin for EncodeError
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<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