pub struct EconomicsRunsQuery {
pub suite: Option<String>,
pub task: Option<String>,
pub variant: Option<String>,
}Expand description
The input of economics.runs: optional filters on suite, task and variant, all of which
must match. An empty query lists every recorded run, and an unknown field is refused.
use majordomus_cli::economics::model::EconomicsRunsQuery;
let wire = serde_json::json!({ "suite": "pilot", "variant": "baseline" });
let q: EconomicsRunsQuery = serde_json::from_value(wire.clone()).unwrap();
assert!(q.task.is_none(), "an absent filter matches every task");
assert_eq!(serde_json::to_value(&q).unwrap(), wire, "absent filters are not written back");
let by_model = serde_json::json!({ "model": "claude-sonnet-5" });
assert!(serde_json::from_value::<EconomicsRunsQuery>(by_model).is_err());Fields§
§suite: Option<String>Only this suite.
task: Option<String>Only this task.
variant: Option<String>Only this variant.
Trait Implementations§
Source§impl BenchmarkCases for EconomicsRunsQuery
impl BenchmarkCases for EconomicsRunsQuery
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 EconomicsRunsQuery
impl Clone for EconomicsRunsQuery
Source§fn clone(&self) -> EconomicsRunsQuery
fn clone(&self) -> EconomicsRunsQuery
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 EconomicsRunsQuery
impl Debug for EconomicsRunsQuery
Source§impl Default for EconomicsRunsQuery
impl Default for EconomicsRunsQuery
Source§fn default() -> EconomicsRunsQuery
fn default() -> EconomicsRunsQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EconomicsRunsQuerywhere
EconomicsRunsQuery: Default,
impl<'de> Deserialize<'de> for EconomicsRunsQuerywhere
EconomicsRunsQuery: 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 EconomicsRunsQuery
impl JsonSchema for EconomicsRunsQuery
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 EconomicsRunsQuery
impl PartialEq for EconomicsRunsQuery
Source§fn eq(&self, other: &EconomicsRunsQuery) -> bool
fn eq(&self, other: &EconomicsRunsQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsRunsQuery
impl Serialize for EconomicsRunsQuery
impl StructuralPartialEq for EconomicsRunsQuery
Auto Trait Implementations§
impl Freeze for EconomicsRunsQuery
impl RefUnwindSafe for EconomicsRunsQuery
impl Send for EconomicsRunsQuery
impl Sync for EconomicsRunsQuery
impl Unpin for EconomicsRunsQuery
impl UnsafeUnpin for EconomicsRunsQuery
impl UnwindSafe for EconomicsRunsQuery
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