pub struct InspectLimits {
pub max_input_bytes: usize,
pub max_canvas_pixels: u64,
pub max_frame_count: u32,
pub max_frame_rgba_bytes: usize,
}Expand description
Resource limits used while classifying a WebP container and reading its animation metadata.
The Default values mirror DecodeLimits::default. Metadata inspection
does not decode the complete frame sequence, but animated inputs are still
checked against the canvas, frame-count, and per-frame RGBA limits.
Fields§
§max_input_bytes: usizeMaximum number of input bytes accepted by inspect.
max_canvas_pixels: u64Maximum number of pixels in the image canvas.
max_frame_count: u32Maximum number of frames reported for an animated input.
max_frame_rgba_bytes: usizeMaximum number of bytes in one full-canvas RGBA frame.
Implementations§
Source§impl InspectLimits
impl InspectLimits
Sourcepub const fn for_trusted_input() -> Self
pub const fn for_trusted_input() -> Self
Relaxes crate-level metadata inspection limits for trusted input.
This does not bypass libwebp or platform allocation limits.
Trait Implementations§
Source§impl Clone for InspectLimits
impl Clone for InspectLimits
Source§fn clone(&self) -> InspectLimits
fn clone(&self) -> InspectLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InspectLimits
impl Debug for InspectLimits
Auto Trait Implementations§
impl Freeze for InspectLimits
impl RefUnwindSafe for InspectLimits
impl Send for InspectLimits
impl Sync for InspectLimits
impl Unpin for InspectLimits
impl UnsafeUnpin for InspectLimits
impl UnwindSafe for InspectLimits
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