pub enum ValidationFinding {
UnknownHCode {
code: String,
full_text: Option<String>,
statement_index: usize,
},
UnknownPCode {
code: String,
full_text: Option<String>,
category: PCodeCategory,
statement_index: usize,
},
CasCheckDigit {
cas: String,
composition_index: usize,
expected_digit: u32,
},
}Expand description
An actionable validation finding with enough context to apply a correction.
Unlike the string-based validate() warnings, these carry the structured
field path and the pre-computed correct value so crate::converter::corrector
can apply fixes without re-parsing warning messages.
Variants§
UnknownHCode
An H-code in HazardLabelling.HazardStatement is not in the GHS H-code list.
Fields
UnknownPCode
A P-code in PrecautionaryStatements is not in the GHS P-code list.
Fields
§
category: PCodeCategoryWhich sub-list the entry belongs to.
CasCheckDigit
A CAS number whose check digit does not match; expected_digit is already computed.
Trait Implementations§
Source§impl Clone for ValidationFinding
impl Clone for ValidationFinding
Source§fn clone(&self) -> ValidationFinding
fn clone(&self) -> ValidationFinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidationFinding
impl RefUnwindSafe for ValidationFinding
impl Send for ValidationFinding
impl Sync for ValidationFinding
impl Unpin for ValidationFinding
impl UnsafeUnpin for ValidationFinding
impl UnwindSafe for ValidationFinding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more