pub struct EconomicsMethodologyChange {
pub version: u32,
pub why: String,
}Expand description
One entry of the methodology’s change log.
use majordomus_cli::economics::model::EconomicsMethodologyChange;
let first = serde_json::json!({ "version": 1, "why": "The first methodology." });
let c: EconomicsMethodologyChange = serde_json::from_value(first).unwrap();
assert_eq!(c.version, 1);
let silent = serde_json::json!({ "version": 2 });
let refused = serde_json::from_value::<EconomicsMethodologyChange>(silent);
assert!(refused.is_err(), "a change says why");Fields§
§version: u32The version it introduced.
why: StringWhy.
Trait Implementations§
Source§impl Clone for EconomicsMethodologyChange
impl Clone for EconomicsMethodologyChange
Source§fn clone(&self) -> EconomicsMethodologyChange
fn clone(&self) -> EconomicsMethodologyChange
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 EconomicsMethodologyChange
impl Debug for EconomicsMethodologyChange
Source§impl<'de> Deserialize<'de> for EconomicsMethodologyChange
impl<'de> Deserialize<'de> for EconomicsMethodologyChange
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 EconomicsMethodologyChange
impl JsonSchema for EconomicsMethodologyChange
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 EconomicsMethodologyChange
impl PartialEq for EconomicsMethodologyChange
Source§fn eq(&self, other: &EconomicsMethodologyChange) -> bool
fn eq(&self, other: &EconomicsMethodologyChange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EconomicsMethodologyChange
Auto Trait Implementations§
impl Freeze for EconomicsMethodologyChange
impl RefUnwindSafe for EconomicsMethodologyChange
impl Send for EconomicsMethodologyChange
impl Sync for EconomicsMethodologyChange
impl Unpin for EconomicsMethodologyChange
impl UnsafeUnpin for EconomicsMethodologyChange
impl UnwindSafe for EconomicsMethodologyChange
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