pub struct FindingSink { /* private fields */ }Expand description
Collects findings on behalf of one check, stamping each with the check ID.
Implementations§
Source§impl FindingSink
impl FindingSink
Sourcepub fn push(&mut self, seq: Option<u64>, detail: String)
pub fn push(&mut self, seq: Option<u64>, detail: String)
Records a finding at an event (seq) with an actionable detail sentence.
Sourcepub const fn examined(&mut self)
pub const fn examined(&mut self)
Records that this check considered one more subject.
The counting rule, applied identically by every check:
A subject is a trace element the check considered — one that, with different content, could have produced a finding. Count it after the filters that define the clause’s scope, and before the condition that makes an element a violation.
So a prohibition over server messages counts every server message, because any of them could have been the violation; a clause about subscription streams counts only messages on such a stream, because a session without one gave the clause nothing to bind to. The difference is what separates “complied with” from “never came up”, and reporting the second as the first states evidence the trace does not carry.
Prohibitions come in two shapes, and they count differently. Where
a clause forbids an element from having some property (“notifications
MUST NOT include an ID”), the element is the subject: no notifications,
nothing judged. Where it forbids the element from existing at all
inside a window (“the server SHOULD NOT send requests before
initialized”), the window is the subject, because sending nothing
through a window the trace shows is exactly what compliance looks like.
Counting the forbidden element there would report every clean session
as unjudged — and, worse, report two clauses of identical shape
differently depending on which party happened to send something.