pub struct SafetyLimits {
pub max_pixels: u64,
pub max_base64_bytes: usize,
pub max_download_bytes: usize,
pub max_images_extract: usize,
pub max_stdin_bytes: u64,
}Expand description
Safety limits for untrusted input processing.
Fields§
§max_pixels: u64Maximum pixels (width * height) before rejecting an image decode. Default: 100 megapixels (100_000_000).
max_base64_bytes: usizeMaximum base64 input length in bytes before rejecting. Default: 30 MB (30_000_000). Decoded size is ~75% of this.
max_download_bytes: usizeMaximum HTTP response body size in bytes. Default: 25 MB (25_000_000).
max_images_extract: usizeMaximum images to extract from a single payload. Default: 50. Prevents OOM from payloads with hundreds of images.
max_stdin_bytes: u64Maximum stdin input size in bytes. Default: 500 MB (500_000_000).
Trait Implementations§
Source§impl Clone for SafetyLimits
impl Clone for SafetyLimits
Source§fn clone(&self) -> SafetyLimits
fn clone(&self) -> SafetyLimits
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 SafetyLimits
impl Debug for SafetyLimits
Auto Trait Implementations§
impl Freeze for SafetyLimits
impl RefUnwindSafe for SafetyLimits
impl Send for SafetyLimits
impl Sync for SafetyLimits
impl Unpin for SafetyLimits
impl UnsafeUnpin for SafetyLimits
impl UnwindSafe for SafetyLimits
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