pub struct Report {
pub document: String,
pub valid: bool,
pub diagnostics: Vec<Diagnostic>,
pub omitted: usize,
pub text: Option<String>,
pub fixed: Option<String>,
pub applied: Vec<Fix>,
}Expand description
The answer for one document.
Fields§
§document: StringThe document kind: project, spec, template, …
valid: boolThe engine’s verdict; false whenever the reader had to recover.
diagnostics: Vec<Diagnostic>The problems, by place in the text, errors first at one place.
omitted: usizeHow many diagnostics are not answered (past the limit or the collector’s capacity).
text: Option<String>The plain-text rendering, when asked for.
fixed: Option<String>The document with every certain fix applied, when asked for; the report is then of it.
applied: Vec<Fix>The fixes applied to make fixed.
Implementations§
Source§impl Report
impl Report
Sourcepub fn assemble(
document: &str,
valid: bool,
collected: Collector,
source: Option<&str>,
options: &Options,
) -> Self
pub fn assemble( document: &str, valid: bool, collected: Collector, source: Option<&str>, options: &Options, ) -> Self
Orders, groups, caps and renders what was collected. source is the text the
document was read from, for excerpts.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Whether any diagnostic is an error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Report
impl<'de> Deserialize<'de> for Report
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Report
Auto Trait Implementations§
impl Forget for Report
impl Freeze for Reportwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Diagnostic>: Freeze,
PhantomData<Fix>: Freeze,
impl Move for Report
impl RefUnwindSafe for Report
impl Send for Reportwhere
RawVecInner: Send,
impl Sync for Reportwhere
RawVecInner: Sync,
impl Unpin for Report
impl UnsafeUnpin for Reportwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Diagnostic>: UnsafeUnpin,
PhantomData<Fix>: UnsafeUnpin,
impl UnwindSafe for Reportwhere
RawVecInner: UnwindSafe,
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