#[non_exhaustive]pub enum Error {
Decode(J2kError),
NativeDecode {
context: &'static str,
source: NativeBackendError,
},
Buffer(BufferError),
HostAllocationFailed {
bytes: usize,
what: &'static str,
},
HostAllocationTooLarge {
requested: usize,
cap: usize,
what: &'static str,
},
HtJobChunkPlan(HtGpuJobChunkPlanError),
UnsupportedBackend {
request: BackendRequest,
},
UnsupportedCudaRequest {
reason: &'static str,
},
CudaUnavailable,
CudaRuntime {
source: CudaError,
},
CudaTier1JobFailed {
source_index: usize,
original_job_index: usize,
source: CudaError,
},
CudaCleanupFailed {
primary: Box<Error>,
cleanup: Box<Error>,
},
}Expand description
Error returned by the CUDA JPEG 2000 adapter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decode(J2kError)
CPU JPEG 2000 decode failed.
NativeDecode
Native decoder failure produced while preparing CUDA-resident work.
Fields
source: NativeBackendErrorConcrete native decoder failure.
Buffer(BufferError)
Caller-owned output buffers were invalid.
HostAllocationFailed
A host-side allocation needed by the adapter could not be reserved.
Fields
HostAllocationTooLarge
Allocator-reported host capacity exceeds the codec phase budget.
Fields
HtJobChunkPlan(HtGpuJobChunkPlanError)
Bounded HTJ2K GPU job planning rejected one source job.
UnsupportedBackend
Backend request is unsupported by this adapter.
Fields
request: BackendRequestRequested backend.
UnsupportedCudaRequest
CUDA request is unsupported by the strict CUDA adapter contract.
CUDA runtime or device is unavailable.
CudaRuntime
CUDA runtime returned an error.
Fields
CudaTier1JobFailed
A classic JPEG 2000 or HTJ2K tier-1 descriptor failed during GPU execution.
Fields
CudaCleanupFailed
A CUDA operation failed and the required resource cleanup also failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<BufferError> for Error
impl From<BufferError> for Error
Source§fn from(source: BufferError) -> Self
fn from(source: BufferError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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