pub enum WarningCode {
LowConfidenceReadingOrder,
LowConfidenceTableStructure,
HiddenTextDetected,
OffPageTextDetected,
LowContrastTextDetected,
AnnotationsPresent,
ExternalLinksPresent,
ImageOnlyPage,
UnsupportedAnnotation,
PartialParse,
CapabilityLimited,
}Expand description
The 11 stable warning codes. Wire format is snake_case.
Variants§
LowConfidenceReadingOrder
Reading-order heuristic below confidence threshold.
LowConfidenceTableStructure
Table-structure heuristic below confidence threshold.
HiddenTextDetected
Hidden text detected (excluded from default chunks).
OffPageTextDetected
Text positioned off the page box (excluded from default chunks).
LowContrastTextDetected
Low-contrast (e.g. white-on-white) text detected (excluded from default chunks).
AnnotationsPresent
Annotations present on a page.
ExternalLinksPresent
External links present (never followed).
ImageOnlyPage
Page has no extractable text (image-only).
UnsupportedAnnotation
Annotation subtype not supported.
PartialParse
Parse completed partially (e.g. a page-level failure inside limits).
CapabilityLimited
A grounding/verification capability was missing; result downgraded explicitly.
Implementations§
Source§impl WarningCode
impl WarningCode
Sourcepub const ALL: [WarningCode; 11]
pub const ALL: [WarningCode; 11]
All codes, in contract order.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Stable wire string (snake_case), identical to the serde form.
Sourcepub fn is_security(self) -> bool
pub fn is_security(self) -> bool
Security-class codes route to security_warnings / the security report;
the rest are parser warnings (determinism contract §8).
Sourcepub fn is_inventory_backed_security(self) -> bool
pub fn is_inventory_backed_security(self) -> bool
Security-report codes that currently require inventory data not present in the canonical document warning lane.
Sourcepub fn is_text_backed_security(self) -> bool
pub fn is_text_backed_security(self) -> bool
Security-report codes backed by text spans and excluded from default chunks.
Sourcepub fn is_page_backed_security(self) -> bool
pub fn is_page_backed_security(self) -> bool
Security-report codes that require a page reference.
Sourcepub fn excludes_from_default_chunks(self) -> bool
pub fn excludes_from_default_chunks(self) -> bool
Warning codes that must never appear in default chunk artifacts.
Sourcepub fn security_report_message_template(self) -> Option<&'static str>
pub fn security_report_message_template(self) -> Option<&'static str>
Fixed message template for security-report findings.
Trait Implementations§
Source§impl Clone for WarningCode
impl Clone for WarningCode
Source§fn clone(&self) -> WarningCode
fn clone(&self) -> WarningCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WarningCode
Source§impl Debug for WarningCode
impl Debug for WarningCode
Source§impl<'de> Deserialize<'de> for WarningCode
impl<'de> Deserialize<'de> for WarningCode
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 Display for WarningCode
impl Display for WarningCode
impl Eq for WarningCode
Source§impl Hash for WarningCode
impl Hash for WarningCode
Source§impl Ord for WarningCode
impl Ord for WarningCode
Source§fn cmp(&self, other: &WarningCode) -> Ordering
fn cmp(&self, other: &WarningCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WarningCode
impl PartialEq for WarningCode
Source§fn eq(&self, other: &WarningCode) -> bool
fn eq(&self, other: &WarningCode) -> bool
self and other values to be equal, and is used by ==.