pub struct PricingUnit {
pub default: Option<bool>,
pub entries: HashMap<String, f64>,
pub header: Option<String>,
pub unit: Option<String>,
pub unit_key: PricingUnitUnitKey,
pub value_keys: Vec<String>,
}Expand description
PricingUnit
JSON schema
{
"type": "object",
"required": [
"entries",
"unitKey",
"valueKeys"
],
"properties": {
"default": {
"type": "boolean"
},
"entries": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"header": {
"type": "string"
},
"unit": {
"type": "string"
},
"unitKey": {
"type": "string",
"minLength": 1
},
"valueKeys": {
"type": "array",
"items": {
"type": "string"
}
}
}
}Fields§
§default: Option<bool>§entries: HashMap<String, f64>§header: Option<String>§unit: Option<String>§unit_key: PricingUnitUnitKey§value_keys: Vec<String>Implementations§
Source§impl PricingUnit
impl PricingUnit
pub fn builder() -> PricingUnit
Trait Implementations§
Source§impl Clone for PricingUnit
impl Clone for PricingUnit
Source§fn clone(&self) -> PricingUnit
fn clone(&self) -> PricingUnit
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 PricingUnit
impl Debug for PricingUnit
Source§impl<'de> Deserialize<'de> for PricingUnit
impl<'de> Deserialize<'de> for PricingUnit
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 From<PricingUnit> for PricingUnit
impl From<PricingUnit> for PricingUnit
Source§fn from(value: PricingUnit) -> Self
fn from(value: PricingUnit) -> Self
Converts to this type from the input type.
Source§impl Serialize for PricingUnit
impl Serialize for PricingUnit
Source§impl TryFrom<PricingUnit> for PricingUnit
impl TryFrom<PricingUnit> for PricingUnit
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PricingUnit) -> Result<Self, ConversionError>
fn try_from(value: PricingUnit) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PricingUnit
impl RefUnwindSafe for PricingUnit
impl Send for PricingUnit
impl Sync for PricingUnit
impl Unpin for PricingUnit
impl UnsafeUnpin for PricingUnit
impl UnwindSafe for PricingUnit
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