#[non_exhaustive]pub enum LimitKind {
Show 17 variants
InputBytes,
Lines,
Units,
UnitChars,
Context,
XmlDepth,
Depth,
XmlElements,
XmlEntities,
Paragraphs,
Spreadsheet,
ZipEntries,
ZipBytes,
ZipRatio,
ZipMalformed,
OutputBytes,
Skeleton,
}Expand description
Which limit a refusal is about.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InputBytes
The file is too large.
Lines
Too many lines.
Units
Too many units or segments.
UnitChars
A unit is too long.
Context
Too much key, note and other context text on the units (Limits::max_context_bytes).
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.
OutputBytes
A merge would write more than Limits::max_output_bytes.
Skeleton
A stored document’s skeleton is larger, or refers to its units more often (in all, or to any one unit), than any extraction makes it, or refers to a unit the document does not have. Merge only.