pub struct ValidationIssue {
pub severity: Severity,
pub code: String,
pub message: String,
pub location: Option<String>,
}Expand description
A validation issue found in a PDF document.
Describes a specific PDF specification violation or non-conformance, including its severity, an identifying code, a human-readable message, and an optional location within the document.
Fields§
§severity: SeveritySeverity of the issue.
code: StringMachine-readable issue code (e.g., “MISSING_TYPE”, “BROKEN_REF”).
message: StringHuman-readable description of the issue.
location: Option<String>Optional location within the PDF (e.g., “page 3”, “object 5 0”).
Implementations§
Source§impl ValidationIssue
impl ValidationIssue
Sourcepub fn new(
severity: Severity,
code: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn new( severity: Severity, code: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new validation issue.
Sourcepub fn with_location(
severity: Severity,
code: impl Into<String>,
message: impl Into<String>,
location: impl Into<String>,
) -> Self
pub fn with_location( severity: Severity, code: impl Into<String>, message: impl Into<String>, location: impl Into<String>, ) -> Self
Create a new validation issue with a location.
Sourcepub fn is_warning(&self) -> bool
pub fn is_warning(&self) -> bool
Returns true if the issue is a warning.
Trait Implementations§
Source§impl Clone for ValidationIssue
impl Clone for ValidationIssue
Source§fn clone(&self) -> ValidationIssue
fn clone(&self) -> ValidationIssue
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 ValidationIssue
impl Debug for ValidationIssue
Source§impl Display for ValidationIssue
impl Display for ValidationIssue
Source§impl PartialEq for ValidationIssue
impl PartialEq for ValidationIssue
impl Eq for ValidationIssue
impl StructuralPartialEq for ValidationIssue
Auto Trait Implementations§
impl Freeze for ValidationIssue
impl RefUnwindSafe for ValidationIssue
impl Send for ValidationIssue
impl Sync for ValidationIssue
impl Unpin for ValidationIssue
impl UnsafeUnpin for ValidationIssue
impl UnwindSafe for ValidationIssue
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