#[non_exhaustive]pub enum LimitKind {
Width,
Height,
Pixels,
Memory,
InputSize,
OutputSize,
Frames,
Duration,
TotalPixels,
Scans,
DecompressionRatio,
}Expand description
Which resource cap a LimitExceeded refers to, without the actual/max
values. Carried by
ResourceError::Limits (the payload of
ErrorCategory::Resource) for routing;
obtain it from LimitExceeded::kind.
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.
Width
Height
Pixels
Memory
InputSize
OutputSize
Frames
Duration
TotalPixels
Scans
A structural per-image cap on the number of coded passes / scans was
exceeded — e.g. a progressive-JPEG scan-count ceiling. An anti-DoS
bound on decode work, not a pixel/byte size. No LimitExceeded
variant carries actual/max for this; codecs route it directly via
ErrorCategory::Resource.
DecompressionRatio
A decompression-ratio (“compression bomb”) ceiling was exceeded — the
declared/expanding output is disproportionate to the input size. A
security-relevant anti-DoS bound distinct from an absolute
Memory cap. Codecs route it directly via
ErrorCategory::Resource.
Trait Implementations§
impl Copy for LimitKind
impl Eq for LimitKind
Source§impl From<LimitKind> for ErrorCategory
impl From<LimitKind> for ErrorCategory
impl StructuralPartialEq for LimitKind
Auto Trait Implementations§
impl Freeze for LimitKind
impl RefUnwindSafe for LimitKind
impl Send for LimitKind
impl Sync for LimitKind
impl Unpin for LimitKind
impl UnsafeUnpin for LimitKind
impl UnwindSafe for LimitKind
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