pub struct EconomicsVariant {
pub id: String,
pub role: String,
pub title: String,
pub description: String,
pub excludes: Vec<String>,
}Expand description
One arm of the experiment: what the session runs with, and what it runs without.
use majordomus_cli::economics::model::EconomicsVariant;
let v: EconomicsVariant = serde_json::from_value(serde_json::json!({
"id": "baseline", "role": "control", "title": "Without Majordomus",
"description": "The fixture repository as a competent team keeps it."
}))
.unwrap();
assert_eq!(v.role, "control");
assert!(v.excludes.is_empty(), "an arm that names no exclusion excludes nothing");Fields§
§id: Stringbaseline, majordomus, …
role: Stringcontrol or treatment.
title: StringA short name.
description: StringExactly what the arm consists of.
excludes: Vec<String>What the arm deliberately does not include.
Trait Implementations§
Source§impl Clone for EconomicsVariant
impl Clone for EconomicsVariant
Source§fn clone(&self) -> EconomicsVariant
fn clone(&self) -> EconomicsVariant
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 EconomicsVariant
impl Debug for EconomicsVariant
Source§impl<'de> Deserialize<'de> for EconomicsVariant
impl<'de> Deserialize<'de> for EconomicsVariant
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 EconomicsVariant
impl JsonSchema for EconomicsVariant
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 EconomicsVariant
impl PartialEq for EconomicsVariant
Source§fn eq(&self, other: &EconomicsVariant) -> bool
fn eq(&self, other: &EconomicsVariant) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsVariant
impl Serialize for EconomicsVariant
impl StructuralPartialEq for EconomicsVariant
Auto Trait Implementations§
impl Freeze for EconomicsVariant
impl RefUnwindSafe for EconomicsVariant
impl Send for EconomicsVariant
impl Sync for EconomicsVariant
impl Unpin for EconomicsVariant
impl UnsafeUnpin for EconomicsVariant
impl UnwindSafe for EconomicsVariant
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