#[non_exhaustive]pub struct ResourceLimits {Show 21 fields
pub max_file_bytes: u64,
pub max_objects: u64,
pub max_object_depth: u32,
pub max_array_len: u64,
pub max_dict_entries: u64,
pub max_name_bytes: usize,
pub max_string_bytes: usize,
pub max_password_bytes: usize,
pub max_decrypted_string_bytes: usize,
pub max_stream_declared_bytes: u64,
pub max_stream_decode_bytes: u64,
pub max_decrypted_stream_bytes: u64,
pub max_encryption_dict_entries: u64,
pub memory_source_threshold_bytes: u64,
pub max_parse_facts: usize,
pub max_xmp_bytes: u64,
pub max_xmp_elements: u64,
pub max_xmp_depth: u32,
pub max_xmp_attributes: usize,
pub max_xmp_namespaces: usize,
pub max_xmp_text_bytes: usize,
}Expand description
Parser and validation resource limits.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_file_bytes: u64Maximum input file bytes.
max_objects: u64Maximum indirect objects.
max_object_depth: u32Maximum nested object depth.
max_array_len: u64Maximum array length.
max_dict_entries: u64Maximum dictionary entries.
max_name_bytes: usizeMaximum PDF name bytes.
max_string_bytes: usizeMaximum string bytes.
max_password_bytes: usizeMaximum password bytes accepted from public APIs and CLI sources.
max_decrypted_string_bytes: usizeMaximum decrypted string bytes.
max_stream_declared_bytes: u64Maximum declared stream bytes.
max_stream_decode_bytes: u64Maximum decoded stream bytes.
max_decrypted_stream_bytes: u64Maximum decrypted stream bytes before downstream filters.
max_encryption_dict_entries: u64Maximum encryption dictionary entries.
memory_source_threshold_bytes: u64Maximum source bytes kept in memory before spilling to a temporary file.
max_parse_facts: usizeMaximum retained parse facts.
max_xmp_bytes: u64Maximum catalog XMP metadata stream bytes.
max_xmp_elements: u64Maximum XML elements parsed from one XMP packet.
max_xmp_depth: u32Maximum XML element nesting depth in one XMP packet.
max_xmp_attributes: usizeMaximum XML attributes accepted on one XMP element.
max_xmp_namespaces: usizeMaximum namespace declarations retained from one XMP packet.
max_xmp_text_bytes: usizeMaximum text bytes retained from one XMP metadata property.
Implementations§
Source§impl ResourceLimits
impl ResourceLimits
Sourcepub fn builder() -> ResourceLimitsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ResourceLimitsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ResourceLimits.
On the builder, call .max_file_bytes(...), .max_objects(...), .max_object_depth(...), .max_array_len(...), .max_dict_entries(...), .max_name_bytes(...), .max_string_bytes(...), .max_password_bytes(...)(optional), .max_decrypted_string_bytes(...)(optional), .max_stream_declared_bytes(...), .max_stream_decode_bytes(...), .max_decrypted_stream_bytes(...)(optional), .max_encryption_dict_entries(...)(optional), .memory_source_threshold_bytes(...)(optional), .max_parse_facts(...), .max_xmp_bytes(...)(optional), .max_xmp_elements(...)(optional), .max_xmp_depth(...)(optional), .max_xmp_attributes(...)(optional), .max_xmp_namespaces(...)(optional), .max_xmp_text_bytes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ResourceLimits.
Trait Implementations§
Source§impl Clone for ResourceLimits
impl Clone for ResourceLimits
Source§fn clone(&self) -> ResourceLimits
fn clone(&self) -> ResourceLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceLimits
impl Debug for ResourceLimits
Source§impl Default for ResourceLimits
impl Default for ResourceLimits
Source§impl<'de> Deserialize<'de> for ResourceLimits
impl<'de> Deserialize<'de> for ResourceLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ResourceLimits
impl PartialEq for ResourceLimits
Source§fn eq(&self, other: &ResourceLimits) -> bool
fn eq(&self, other: &ResourceLimits) -> bool
self and other values to be equal, and is used by ==.