rsiot/message/phy_quantity/ops/
mul.rs

1use super::super::PhyQuantity;
2
3impl std::ops::Mul<f64> for PhyQuantity {
4    type Output = PhyQuantity;
5
6    fn mul(self, rhs: f64) -> Self::Output {
7        PhyQuantity {
8            value: self.value * rhs,
9            quantity_name: self.quantity_name,
10        }
11    }
12}
13
14impl std::ops::Mul<PhyQuantity> for f64 {
15    type Output = PhyQuantity;
16
17    fn mul(self, rhs: PhyQuantity) -> Self::Output {
18        PhyQuantity {
19            value: self * rhs.value,
20            quantity_name: rhs.quantity_name,
21        }
22    }
23}