1 2 3 4 5 6 7 8 9 10 11 12 13
pub struct Amount { inner: i64, } impl Amount { pub fn from_i64(v: i64) -> Amount { Amount { inner: v * 10000000 } } pub fn to_i64(&self) -> i64 { self.inner } }
1 2 3 4 5 6 7 8 9 10 11 12 13
pub struct Amount { inner: i64, } impl Amount { pub fn from_i64(v: i64) -> Amount { Amount { inner: v * 10000000 } } pub fn to_i64(&self) -> i64 { self.inner } }