pub struct Verdict {
pub status: VerdictStatus,
pub counts: VerdictCounts,
pub reasons: Vec<String>,
}Expand description
Overall verdict for a comparison, with pass/warn/fail counts.
§Examples
use perfgate_types::{Verdict, VerdictStatus, VerdictCounts};
let verdict = Verdict {
status: VerdictStatus::Pass,
counts: VerdictCounts { pass: 2, warn: 0, fail: 0, skip: 0 },
reasons: vec![],
};
assert_eq!(verdict.status, VerdictStatus::Pass);
let failing = Verdict {
status: VerdictStatus::Fail,
counts: VerdictCounts { pass: 1, warn: 0, fail: 1, skip: 0 },
reasons: vec!["wall_ms.fail".into()],
};
assert_eq!(failing.status, VerdictStatus::Fail);
assert!(!failing.reasons.is_empty());Fields§
§status: VerdictStatus§counts: VerdictCounts§reasons: Vec<String>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Verdict
impl<'de> Deserialize<'de> for Verdict
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Verdict
impl JsonSchema for Verdict
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl 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