#[non_exhaustive]pub enum Error {
Show 127 variants
InvalidRawQuantTable,
InvalidDistanceBand(usize, f32),
InvalidAFVBands,
InvalidQuantizationTableWeight(f32),
OutOfBounds(usize),
SectionTooShort,
NonZeroPadding,
InvalidSignature,
InvalidExponent(u32),
InvalidMantissa(i32),
InvalidBitsPerSample(u32),
InvalidEnum(u32, String),
DimShiftTooLarge(u32),
FloatNaNOrInf,
InvalidGamma(f32),
InvalidColorEncoding,
InvalidColorSpace,
InvalidRenderingIntent,
InvalidIntensityTarget(f32),
InvalidMinNits(f32),
InvalidLinearBelow(bool, f32),
SizeOverflow,
InvalidBox,
IccTooLarge,
IccEndOfStream,
InvalidIccStream,
InvalidUintConfig(u32, u32, Option<u32>),
Lz77Disallowed,
UnexpectedLz77Repeat,
AlphabetTooLargeHuff(usize),
InvalidHuffman,
InvalidAnsHistogram,
AnsChecksumMismatch,
IntegerTooLarge(u32),
InvalidContextMap(u32),
InvalidContextMapHole(u32, u32),
InvalidPermutationSize {
size: u32,
skip: u32,
end: u32,
},
InvalidPermutationLehmerCode {
size: u32,
idx: u32,
lehmer: u32,
},
InvalidQuantEncodingMode,
InvalidQuantEncoding {
mode: u8,
required_size: usize,
},
InvalidEcUpsampling(u32, u32, u32),
PatchesUnsupportedMixedUpsampling(u32, u32),
InvalidLfLevel(u32),
NumPassesTooLarge(u32, u32),
PassesDownsampleNonDecreasing,
PassesLastPassNonIncreasing,
PassesLastPassTooLarge,
NonPatchReferenceWithCrop,
Non444ChromaSubsampling,
InvalidBlockSizeForChromaSubsampling,
OutOfMemory(TryReserveError),
ImageOutOfMemory(usize, usize),
ImageSizeTooLarge(usize, usize),
ImageDimensionTooLarge(u64),
InvalidImageSize(usize, usize),
ArithmeticOverflow,
PipelineChannelTypeMismatch(String, usize, DataTypeTag, DataTypeTag),
PipelineInvalidStageAfterExtend(String),
CopyOfDifferentSize(usize, usize, usize, usize),
LfQuantFactorTooSmall(f32),
HfQuantFactorTooSmall(f32),
InvalidPredictor(u32),
InvalidProperty(u32),
InvalidBlendingAlphaChannel(usize, usize),
PatchesInvalidAlphaChannel(usize, usize),
PatchesInvalidBlendMode(u8, u8),
PatchesInvalidDelta(String, usize, i32),
PatchesInvalidPosition(String, usize, usize, usize),
PatchesInvalidReference(usize),
PatchesOutOfBounds(String, usize, usize, usize),
PatchesPostColorTransform(),
PatchesTooMany(String, usize, usize),
PatchesRefTooLarge(usize, usize),
PointListEmpty,
SplinesAreaTooLarge(u64, u64),
SplinesDistanceTooLarge(u64, u64),
SplinesTooMany(u32, u32),
SplineAdjacentCoincidingControlPoints(usize, Point, usize, Point),
SplinesTooManyControlPoints(u32, u32),
SplinesPointOutOfRange(Point, i32, Range<i32>),
SplinesCoordinatesLimit(isize, isize),
SplinesDeltaLimit(i64, i64),
TreeTooLarge(usize, usize),
TreeTooTall(usize, usize),
TreeMultiplierTooLarge(u32, u32),
TreeMultiplierBitsTooLarge(u32, u32),
TreeSplitOnEmptyRange(u8, i32, i32, i32),
NoGlobalTree,
InvalidTransformId,
InvalidRCT(u32),
InvalidChannelRange(usize, usize, usize),
MixingDifferentChannels,
MetaSqueezeRequiresInPlace,
TooManySqueezes,
BlockContextMapSizeTooBig(usize, usize),
TooManyBlockContexts,
BaseColorCorrelationOutOfRange,
InvalidEpfValue(i32),
InvalidVarDCTTransform(usize),
InvalidVarDCTTransformMap,
HFBlockOutOfBounds,
InvalidNumNonZeros(usize, usize),
EndOfBlockResidualNonZeros(usize),
TransferFunctionUnknown,
IccWriteOutOfBounds,
IccInvalidTagString(String),
IccMlucTextNotAscii(String),
IccValueOutOfRangeS15Fixed16(f32),
IccInvalidWhitePointY(f32),
IccInvalidWhitePoint(f32, f32, String),
MatrixInversionFailed(f64),
IccUnsupportedTransferFunction,
IccTableSizeExceeded(usize),
ICCOutputNoCMS,
NonXybOutputNoCMS,
IOError(Error),
WrongBufferCount(usize, usize),
NotGrayscale,
InvalidOutputBufferSize(usize, usize, usize, usize, JxlColorType, JxlDataFormat),
SaveDifferentDownsample((u8, u8), (u8, u8)),
TooManyExtraChannels(usize),
CmsChannelCountIncrease {
in_channels: usize,
out_channels: usize,
},
CmsConsumedChannelRequested {
channel_index: usize,
channel_type: String,
},
CmsError(String),
LimitExceeded {
resource: &'static str,
actual: u64,
limit: u64,
},
Cancelled,
InvalidGainMap(String),
}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.
InvalidRawQuantTable
InvalidDistanceBand(usize, f32)
InvalidAFVBands
InvalidQuantizationTableWeight(f32)
OutOfBounds(usize)
SectionTooShort
NonZeroPadding
InvalidSignature
InvalidExponent(u32)
InvalidMantissa(i32)
InvalidBitsPerSample(u32)
InvalidEnum(u32, String)
DimShiftTooLarge(u32)
FloatNaNOrInf
InvalidGamma(f32)
InvalidColorEncoding
InvalidColorSpace
InvalidRenderingIntent
InvalidIntensityTarget(f32)
InvalidMinNits(f32)
InvalidLinearBelow(bool, f32)
SizeOverflow
InvalidBox
IccTooLarge
IccEndOfStream
InvalidIccStream
InvalidUintConfig(u32, u32, Option<u32>)
Lz77Disallowed
UnexpectedLz77Repeat
AlphabetTooLargeHuff(usize)
InvalidHuffman
InvalidAnsHistogram
AnsChecksumMismatch
IntegerTooLarge(u32)
InvalidContextMap(u32)
InvalidContextMapHole(u32, u32)
InvalidPermutationSize
InvalidPermutationLehmerCode
InvalidQuantEncodingMode
InvalidQuantEncoding
InvalidEcUpsampling(u32, u32, u32)
PatchesUnsupportedMixedUpsampling(u32, u32)
InvalidLfLevel(u32)
NumPassesTooLarge(u32, u32)
PassesDownsampleNonDecreasing
PassesLastPassNonIncreasing
PassesLastPassTooLarge
NonPatchReferenceWithCrop
Non444ChromaSubsampling
InvalidBlockSizeForChromaSubsampling
OutOfMemory(TryReserveError)
ImageOutOfMemory(usize, usize)
ImageSizeTooLarge(usize, usize)
ImageDimensionTooLarge(u64)
InvalidImageSize(usize, usize)
ArithmeticOverflow
PipelineChannelTypeMismatch(String, usize, DataTypeTag, DataTypeTag)
PipelineInvalidStageAfterExtend(String)
CopyOfDifferentSize(usize, usize, usize, usize)
LfQuantFactorTooSmall(f32)
HfQuantFactorTooSmall(f32)
InvalidPredictor(u32)
InvalidProperty(u32)
InvalidBlendingAlphaChannel(usize, usize)
PatchesInvalidAlphaChannel(usize, usize)
PatchesInvalidBlendMode(u8, u8)
PatchesInvalidDelta(String, usize, i32)
PatchesInvalidPosition(String, usize, usize, usize)
PatchesInvalidReference(usize)
PatchesOutOfBounds(String, usize, usize, usize)
PatchesPostColorTransform()
PatchesTooMany(String, usize, usize)
PatchesRefTooLarge(usize, usize)
PointListEmpty
SplinesAreaTooLarge(u64, u64)
SplinesDistanceTooLarge(u64, u64)
SplinesTooMany(u32, u32)
SplineAdjacentCoincidingControlPoints(usize, Point, usize, Point)
SplinesTooManyControlPoints(u32, u32)
SplinesPointOutOfRange(Point, i32, Range<i32>)
SplinesCoordinatesLimit(isize, isize)
SplinesDeltaLimit(i64, i64)
TreeTooLarge(usize, usize)
TreeTooTall(usize, usize)
TreeMultiplierTooLarge(u32, u32)
TreeMultiplierBitsTooLarge(u32, u32)
TreeSplitOnEmptyRange(u8, i32, i32, i32)
NoGlobalTree
InvalidTransformId
InvalidRCT(u32)
InvalidChannelRange(usize, usize, usize)
MixingDifferentChannels
MetaSqueezeRequiresInPlace
TooManySqueezes
BlockContextMapSizeTooBig(usize, usize)
TooManyBlockContexts
BaseColorCorrelationOutOfRange
InvalidEpfValue(i32)
InvalidVarDCTTransform(usize)
InvalidVarDCTTransformMap
HFBlockOutOfBounds
InvalidNumNonZeros(usize, usize)
EndOfBlockResidualNonZeros(usize)
TransferFunctionUnknown
IccWriteOutOfBounds
IccInvalidTagString(String)
IccMlucTextNotAscii(String)
IccValueOutOfRangeS15Fixed16(f32)
IccInvalidWhitePointY(f32)
IccInvalidWhitePoint(f32, f32, String)
MatrixInversionFailed(f64)
IccUnsupportedTransferFunction
IccTableSizeExceeded(usize)
ICCOutputNoCMS
NonXybOutputNoCMS
IOError(Error)
WrongBufferCount(usize, usize)
NotGrayscale
InvalidOutputBufferSize(usize, usize, usize, usize, JxlColorType, JxlDataFormat)
SaveDifferentDownsample((u8, u8), (u8, u8))
TooManyExtraChannels(usize)
CmsChannelCountIncrease
CmsConsumedChannelRequested
CmsError(String)
LimitExceeded
Cancelled
InvalidGainMap(String)
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)>
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<StopReason> for Error
impl From<StopReason> for Error
Source§fn from(reason: StopReason) -> Self
fn from(reason: StopReason) -> Self
Converts to this type from the input type.
Source§impl From<TryReserveError> for Error
impl From<TryReserveError> for Error
Source§fn from(source: TryReserveError) -> Self
fn from(source: TryReserveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more