pub struct EconomicsExclusion {
pub run: String,
pub reason: String,
}Expand description
One run excluded under the outlier rule.
use majordomus_cli::economics::model::{EconomicsExclusion, EconomicsOutlierPolicy};
let o: EconomicsOutlierPolicy = serde_json::from_value(serde_json::json!({
"rule": "A run is excluded only by naming it here with a reason.",
"excluded": [{ "run": "vat-rounding--baseline--r2", "reason": "provider outage" }]
}))
.unwrap();
let first: &EconomicsExclusion = &o.excluded[0];
assert_eq!(first.run, "vat-rounding--baseline--r2");
let unexplained = serde_json::json!({ "run": "vat-rounding--baseline--r1" });
assert!(serde_json::from_value::<EconomicsExclusion>(unexplained).is_err());Fields§
§run: StringThe run’s id.
reason: StringWhy.
Trait Implementations§
Source§impl Clone for EconomicsExclusion
impl Clone for EconomicsExclusion
Source§fn clone(&self) -> EconomicsExclusion
fn clone(&self) -> EconomicsExclusion
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 EconomicsExclusion
impl Debug for EconomicsExclusion
Source§impl<'de> Deserialize<'de> for EconomicsExclusion
impl<'de> Deserialize<'de> for EconomicsExclusion
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 EconomicsExclusion
impl JsonSchema for EconomicsExclusion
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 EconomicsExclusion
impl PartialEq for EconomicsExclusion
Source§fn eq(&self, other: &EconomicsExclusion) -> bool
fn eq(&self, other: &EconomicsExclusion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsExclusion
impl Serialize for EconomicsExclusion
impl StructuralPartialEq for EconomicsExclusion
Auto Trait Implementations§
impl Freeze for EconomicsExclusion
impl RefUnwindSafe for EconomicsExclusion
impl Send for EconomicsExclusion
impl Sync for EconomicsExclusion
impl Unpin for EconomicsExclusion
impl UnsafeUnpin for EconomicsExclusion
impl UnwindSafe for EconomicsExclusion
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