pub struct Out {
pub json: bool,
/* private fields */
}Expand description
Where a diagnostic goes once the run has decided to say it: printed as it comes
(text) or kept for the document (json) — or, under --statistics, neither, since the
table it asked for is the tally alone.
Which diagnostics a run says, and in what words, is the library’s
(htl::project::Sink) — a dependency’s error is said once per run, and a replayed
entry comes through the same decisions a fresh check does. What is left here is the
part that is genuinely a command line’s: how a finding reads on a terminal.
Fields§
§json: boolImplementations§
Source§impl Out
impl Out
pub fn new(json: bool, statistics_only: bool) -> Self
pub fn take(&mut self) -> Vec<Diagnostic>
Sourcepub fn rules_said(&self) -> impl Iterator<Item = &str>
pub fn rules_said(&self) -> impl Iterator<Item = &str>
The rules the findings said so far were under, each once, in name order: what
htl check names --explain for after the findings. [NO_RULE] is a key of the
tally, not a rule, and is skipped here.
Sourcepub fn statistics(&self) -> Vec<RuleStatistic>
pub fn statistics(&self) -> Vec<RuleStatistic>
One row per rule with at least one finding, count descending then rule ascending —
ruff --statistics’s shape. A rule with no finding this run is not a key of the
tally at all, so it is never a row.
Trait Implementations§
Source§impl Output for Out
impl Output for Out
Source§fn diagnostic(&mut self, d: &Diagnostic)
fn diagnostic(&mut self, d: &Diagnostic)
fix is what htl fix would
apply; its required_by and origin are set when the finding is in a module this
project required rather than in the project, which is what lets a caller file it
differently without reading the path.Auto Trait Implementations§
impl Freeze for Out
impl RefUnwindSafe for Out
impl Send for Out
impl Sync for Out
impl Unpin for Out
impl UnsafeUnpin for Out
impl UnwindSafe for Out
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
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> ⓘ
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> ⓘ
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