pub struct Finding {
pub code: String,
pub set: String,
pub severity: String,
pub part: String,
pub location: String,
pub ref: String,
pub message: String,
pub word_fatal: bool,
pub repairable: bool,
}Expand description
One thing wrong with a package, from any rule set: Word validity
(word), tracked-edit discipline (edits), or the crate::audit sets
(a11y, style, structure). For word and edits, location is the
element chain inside part (w:body[0]/w:p[3]/w:r[2], each name indexed
among its same-named siblings, root excluded), stable across runs, or a
paragraph id (p3); empty for a package-level finding. For the audit
sets it is the paragraph id (p5, header1, header1.p1:
crate::ids::paragraph_id) or, when no paragraph applies, the part
name. ref is the same text as location. Messages name paragraphs by
the same ids.
Fields§
§code: StringStable code (TEXT_INSIDE_DELETION, MC_UNBOUND_PREFIX, …).
set: StringThe rule set it belongs to: one of RULE_SETS.
severity: Stringerror, warning or info. A word finding is an error when
Word-fatal, OOXML-invalid (DUPLICATE_REVISION_ID), or a revision
Word cannot resolve (CELL_FINAL_MARK_REVISION); otherwise a
warning (a lead), or info for direct
same-kind revision nesting that Word reads faithfully.
part: StringPackage part the finding sits in.
location: StringWhere in the part (see the type’s doc), or empty.
ref: StringThe short id the text listing prints for Finding::location.
message: StringHuman-readable detail.
word_fatal: boolTrue when Word refuses or repairs the file for this (Ring-1 and
Ring-3 evidence); false for leads (DUPLICATE_DOCPR_ID) and for
every finding outside the word set.
repairable: boolTrue when repair fixes it deterministically.
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn new(
code: &str,
part: &str,
location: impl Into<String>,
message: impl Into<String>,
) -> Finding
pub fn new( code: &str, part: &str, location: impl Into<String>, message: impl Into<String>, ) -> Finding
A word finding with word_fatal and repairable taken from the
code’s table (traits). OOXML-invalid duplicate revision ids and
a cell’s final mark revision are errors, though Word opens them.
Source§impl Finding
impl Finding
Sourcepub fn identity(&self) -> FindingKey
pub fn identity(&self) -> FindingKey
This finding’s FindingKey: baseline matches findings by it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Finding
impl<'de> Deserialize<'de> for Finding
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Finding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Finding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Finding
Source§impl From<AuditFinding> for Finding
impl From<AuditFinding> for Finding
Source§fn from(f: AuditFinding) -> Finding
fn from(f: AuditFinding) -> Finding
The audit’s finding in the shared shape: its part is the story’s
part for a paragraph id (p3 → word/document.xml), else the
location itself (a part name); it is never Word-fatal or repairable.
Source§impl Serialize for Finding
impl Serialize for Finding
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Finding
Auto Trait Implementations§
impl Forget for Finding
impl Freeze for Finding
impl Move for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.