Skip to main content

FindingSink

Struct FindingSink 

Source
pub struct FindingSink { /* private fields */ }
Expand description

Collects findings on behalf of one check, stamping each with the check ID.

Implementations§

Source§

impl FindingSink

Source

pub fn push(&mut self, seq: Option<u64>, detail: String)

Records a finding at an event (seq) with an actionable detail sentence.

Source

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.

Trait Implementations§

Source§

impl Debug for FindingSink

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.