#[non_exhaustive]pub enum Verdict {
Exact,
EquallyCorrectButDifferent,
Wrong,
Missing,
}Expand description
The result of running one capability’s test, before anything is recorded.
The four outcomes of docs/DESIGN-KINDS.md §2.1 #3.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exact
The result matches the capability’s written contract.
EquallyCorrectButDifferent
Correct but different (pi as 3.141592 where 3.14159 was expected). The strict leaf stays
off: either widen the test, if it was stricter than the written contract, or mint a new
leaf with its own contract and a generalisation over the leaves. Never by editing the
strict leaf’s meaning.
Wrong
The backend broke the contract: off, and a bug report to the backend’s developer.
Missing
The backend does not give it.
Implementations§
Source§impl Verdict
impl Verdict
Sourcepub fn into_row(
self,
subject: CapabilityId,
backend: impl Into<String>,
version: impl Into<String>,
config: Config,
metadata: Config,
controls: Controls,
) -> Result<Row, ControlsNotRun>
pub fn into_row( self, subject: CapabilityId, backend: impl Into<String>, version: impl Into<String>, config: Config, metadata: Config, controls: Controls, ) -> Result<Row, ControlsNotRun>
Turn a verdict into the row to record.
Only Verdict::Exact needs Controls, because only on is a claim; an off row is the
safe default and can always be recorded.
Trait Implementations§
impl Copy for Verdict
impl Eq for Verdict
impl StructuralPartialEq for Verdict
Auto Trait Implementations§
impl Freeze for Verdict
impl RefUnwindSafe for Verdict
impl Send for Verdict
impl Sync for Verdict
impl Unpin for Verdict
impl UnsafeUnpin for Verdict
impl UnwindSafe for Verdict
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