pub struct EconomicsQuery {
pub suite: Option<String>,
pub category: Option<String>,
pub task: Option<String>,
pub model: Option<String>,
}Expand description
The input of economics.summary: optional narrowing of the pairs and metrics. The
verdict is always about all the evidence, whatever is narrowed, and a narrowed metric
is never verified: the publication rule was evaluated over all of it, not over a slice.
use majordomus_cli::economics::model::EconomicsQuery;
let all: EconomicsQuery = serde_json::from_value(serde_json::json!({})).unwrap();
assert_eq!(all, EconomicsQuery::default());
let q: EconomicsQuery =
serde_json::from_value(serde_json::json!({ "suite": "pilot", "category": "bugfix" }))
.unwrap();
assert_eq!(q.suite.as_deref(), Some("pilot"));
let typo = serde_json::json!({ "suites": "pilot" });
let refused = serde_json::from_value::<EconomicsQuery>(typo);
assert!(refused.is_err(), "a misspelt filter is refused");Fields§
§suite: Option<String>Only this suite.
category: Option<String>Only tasks of this category.
task: Option<String>Only this task.
model: Option<String>Only runs that asked for this model.
Trait Implementations§
Source§impl BenchmarkCases for EconomicsQuery
impl BenchmarkCases for EconomicsQuery
Source§fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
The cases, in a stable order. An empty list means “nothing to benchmark in this
repository”, which the coverage check reports as missing.
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
The cases as JSON, the shape every runner serialises from.
Source§impl Clone for EconomicsQuery
impl Clone for EconomicsQuery
Source§fn clone(&self) -> EconomicsQuery
fn clone(&self) -> EconomicsQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EconomicsQuery
impl Debug for EconomicsQuery
Source§impl Default for EconomicsQuery
impl Default for EconomicsQuery
Source§fn default() -> EconomicsQuery
fn default() -> EconomicsQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EconomicsQuerywhere
EconomicsQuery: Default,
impl<'de> Deserialize<'de> for EconomicsQuerywhere
EconomicsQuery: Default,
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 EconomicsQuery
impl JsonSchema for EconomicsQuery
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 moreSource§impl PartialEq for EconomicsQuery
impl PartialEq for EconomicsQuery
Source§fn eq(&self, other: &EconomicsQuery) -> bool
fn eq(&self, other: &EconomicsQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsQuery
impl Serialize for EconomicsQuery
impl StructuralPartialEq for EconomicsQuery
Auto Trait Implementations§
impl Freeze for EconomicsQuery
impl RefUnwindSafe for EconomicsQuery
impl Send for EconomicsQuery
impl Sync for EconomicsQuery
impl Unpin for EconomicsQuery
impl UnsafeUnpin for EconomicsQuery
impl UnwindSafe for EconomicsQuery
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