pub struct QualityReport { /* private fields */ }Expand description
Results as a report: failures first, a table and a summary. See the module docs.
Implementations§
Source§impl QualityReport
impl QualityReport
Sourcepub fn new(results: impl IntoIterator<Item = CheckResult>) -> Self
pub fn new(results: impl IntoIterator<Item = CheckResult>) -> Self
A report of results, in order.
Sourcepub fn push(&mut self, result: CheckResult) -> &mut Self
pub fn push(&mut self, result: CheckResult) -> &mut Self
Add a result.
Sourcepub fn show_rows(self, rows: usize) -> Self
pub fn show_rows(self, rows: usize) -> Self
The most failing rows shown per check (default FAILING_ROWS).
Sourcepub fn results(&self) -> &[CheckResult]
pub fn results(&self) -> &[CheckResult]
The results, in order.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Whether nothing failed or errored (warnings pass).
Trait Implementations§
Source§impl Clone for QualityReport
impl Clone for QualityReport
Source§impl Debug for QualityReport
impl Debug for QualityReport
Source§impl PartialEq for QualityReport
impl PartialEq for QualityReport
Source§impl Renderable for QualityReport
impl Renderable for QualityReport
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. Port of
__rich_measure__. The default is what upstream’s Measurement.get
returns for a renderable without one: anything from nothing to the
whole width, (0, max_width).Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Source§fn vertical(&self) -> Option<VerticalAlign>
fn vertical(&self) -> Option<VerticalAlign>
The vertical alignment a
Table cell holding this renderable uses in
place of its column’s. Upstream reads getattr(renderable, "vertical", None); Align sets it.Source§fn print_end_line(&self, _options: &ConsoleOptions) -> bool
fn print_end_line(&self, _options: &ConsoleOptions) -> bool
Whether a top-level print ends this renderable’s last line. This
port’s renderables separate lines, where upstream’s end each line
with
"\n", so a print adds the final line break. A renderable
whose upstream output stops without one (Screen, LiveRender, a
Rule whose end has no newline) returns false, and the next
output continues its last line. options are the print’s options.impl StructuralPartialEq for QualityReport
Auto Trait Implementations§
impl Freeze for QualityReport
impl RefUnwindSafe for QualityReport
impl Send for QualityReport
impl Sync for QualityReport
impl Unpin for QualityReport
impl UnsafeUnpin for QualityReport
impl UnwindSafe for QualityReport
Blanket Implementations§
impl<T> Allocation for T
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