#[non_exhaustive]pub enum LimitExceeded {
Width {
actual: u32,
max: u32,
},
Height {
actual: u32,
max: u32,
},
Pixels {
actual: u64,
max: u64,
},
Memory {
actual: u64,
max: u64,
},
InputSize {
actual: u64,
max: u64,
},
OutputSize {
actual: u64,
max: u64,
},
Frames {
actual: u32,
max: u32,
},
Duration {
actual: u64,
max: u64,
},
}Expand description
A resource limit was exceeded.
Returned by ResourceLimits::check_dimensions() and related methods.
Each variant carries the actual value and the limit that was exceeded,
enabling useful error messages.
Implements core::error::Error so codecs can wrap it in their own
error types.
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
Image width exceeded max_width.
Height
Image height exceeded max_height.
Pixels
Pixel count exceeded max_pixels.
Memory
Memory exceeded max_memory_bytes.
InputSize
Input data size exceeded max_input_bytes.
OutputSize
Encoded output exceeded max_output_bytes.
Frames
Frame count exceeded max_frames.
Duration
Animation duration exceeded max_animation_ms.
Trait Implementations§
Source§impl Clone for LimitExceeded
impl Clone for LimitExceeded
Source§fn clone(&self) -> LimitExceeded
fn clone(&self) -> LimitExceeded
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LimitExceeded
impl Debug for LimitExceeded
Source§impl Display for LimitExceeded
impl Display for LimitExceeded
Source§impl Error for LimitExceeded
impl Error for LimitExceeded
1.30.0 · 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 PartialEq for LimitExceeded
impl PartialEq for LimitExceeded
impl Eq for LimitExceeded
impl StructuralPartialEq for LimitExceeded
Auto Trait Implementations§
impl Freeze for LimitExceeded
impl RefUnwindSafe for LimitExceeded
impl Send for LimitExceeded
impl Sync for LimitExceeded
impl Unpin for LimitExceeded
impl UnsafeUnpin for LimitExceeded
impl UnwindSafe for LimitExceeded
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<E> CodecErrorExt for Ewhere
E: Error + 'static,
impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
Source§fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
Find an
UnsupportedOperation in this error’s cause chain.Source§fn limit_exceeded(&self) -> Option<&LimitExceeded>
fn limit_exceeded(&self) -> Option<&LimitExceeded>
Find a
LimitExceeded in this error’s cause chain.