pub struct RationalNumber {
pub exponent: i32,
pub value: i32,
pub custom_data: Option<CustomData>,
}Expand description
Part of ISO 15118-20 price schedule.
The OCPP 2.1 RationalNumber data type.
Fields§
§exponent: i32The exponent to base 10 (dec)
value: i32Value which shall be multiplied.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl RationalNumber
impl RationalNumber
Sourcepub fn new(exponent: i32, value: i32) -> Self
pub fn new(exponent: i32, value: i32) -> Self
Creates a RationalNumber from its required fields.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl Clone for RationalNumber
impl Clone for RationalNumber
Source§impl Debug for RationalNumber
impl Debug for RationalNumber
Source§impl<'de> Deserialize<'de> for RationalNumber
impl<'de> Deserialize<'de> for RationalNumber
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 PartialEq for RationalNumber
impl PartialEq for RationalNumber
Source§impl Serialize for RationalNumber
impl Serialize for RationalNumber
impl StructuralPartialEq for RationalNumber
Source§impl Validate for RationalNumber
impl Validate for RationalNumber
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Forget for RationalNumber
impl Freeze for RationalNumber
impl Move for RationalNumber
impl RefUnwindSafe for RationalNumber
impl Send for RationalNumber
impl Sync for RationalNumber
impl Unpin for RationalNumber
impl UnsafeUnpin for RationalNumber
impl UnwindSafe for RationalNumber
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