#[non_exhaustive]pub enum LimitKind {
Show 14 variants
InputBytes,
Lines,
Units,
UnitChars,
XmlDepth,
Depth,
XmlElements,
XmlEntities,
Paragraphs,
Spreadsheet,
ZipEntries,
ZipBytes,
ZipRatio,
ZipMalformed,
}Expand description
Which limit a refusal is about.
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.
InputBytes
The file is too large.
Lines
Too many lines.
Units
Too many units or segments.
UnitChars
A unit is too long.
XmlDepth
XML nested too deeply.
Depth
Nesting deeper than allowed in a format that is not XML (HTML, JSON, YAML, …). Uses
Limits::max_xml_depth, which is the nesting cap for every format.
XmlElements
Too many XML elements.
XmlEntities
An XML entity declaration (DTD): entity bombs and external entities.
Paragraphs
More paragraphs in a word-processing file than allowed (empty ones count).
Spreadsheet
A spreadsheet over its cell, row, characters-per-cell or total-text limit.
ZipEntries
Too many zip entries.
ZipBytes
Too many bytes once unpacked.
ZipRatio
A zip entry expands too much (a zip bomb).
ZipMalformed
A zip whose declared sizes or names are unsafe or do not match its data.
Trait Implementations§
impl Copy for LimitKind
Source§impl<'de> Deserialize<'de> for LimitKind
impl<'de> Deserialize<'de> for LimitKind
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LimitKind
impl StructuralPartialEq for LimitKind
Auto Trait Implementations§
impl Forget for LimitKind
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