pub struct ConformanceReport {
pub provider: ProviderKey,
pub model: ModelKey,
pub results: Vec<CheckResult>,
}Expand description
The result of one adapter’s conformance run.
Fields§
§provider: ProviderKeyThe provider that was exercised.
model: ModelKeyThe model that was exercised. Conformance is per provider-model pair; a passing report says nothing about a sibling model.
results: Vec<CheckResult>Every check, in Check::run_order order: the feature rows of
Check::ALL with the Check::STATUS rows spliced in where they are
exercised, which is before
RetryClassification rather than at the
end.
Implementations§
Source§impl ConformanceReport
impl ConformanceReport
Sourcepub fn new(provider: ProviderKey, model: ModelKey) -> ConformanceReport
pub fn new(provider: ProviderKey, model: ModelKey) -> ConformanceReport
An empty report for a provider-model pair.
Sourcepub fn push(&mut self, result: CheckResult)
pub fn push(&mut self, result: CheckResult)
Records one result.
Sourcepub fn passed(&self) -> bool
pub fn passed(&self) -> bool
Returns true when nothing failed. A skipped check does not fail a run,
but it does mean the adapter is unproven on that row.
Sourcepub fn failures(&self) -> Vec<&CheckResult>
pub fn failures(&self) -> Vec<&CheckResult>
Every failing check.
Sourcepub fn skipped(&self) -> Vec<&CheckResult>
pub fn skipped(&self) -> Vec<&CheckResult>
Every skipped check.
Sourcepub fn result(&self, check: Check) -> Option<&CheckResult>
pub fn result(&self, check: Check) -> Option<&CheckResult>
The result of one check, when it ran.
Sourcepub fn compatibility_table(&self) -> String
pub fn compatibility_table(&self) -> String
Renders the run as a Markdown compatibility table.
A skipped row renders as unproven, with the reason it was skipped,
because a skip is not a pass: it means the run never exercised the
behaviour. Copying this table into a documentation page therefore
cannot claim more than the run demonstrated — which is the whole reason
the method exists rather than a caller filtering
results by hand and quietly dropping the skips.
Trait Implementations§
Source§impl Clone for ConformanceReport
impl Clone for ConformanceReport
Source§fn clone(&self) -> ConformanceReport
fn clone(&self) -> ConformanceReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConformanceReport
impl Debug for ConformanceReport
Source§impl Display for ConformanceReport
impl Display for ConformanceReport
impl Eq for ConformanceReport
Source§impl PartialEq for ConformanceReport
impl PartialEq for ConformanceReport
impl StructuralPartialEq for ConformanceReport
Auto Trait Implementations§
impl Freeze for ConformanceReport
impl RefUnwindSafe for ConformanceReport
impl Send for ConformanceReport
impl Sync for ConformanceReport
impl Unpin for ConformanceReport
impl UnsafeUnpin for ConformanceReport
impl UnwindSafe for ConformanceReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.