1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#[derive(Debug, Clone, Copy)] pub struct PriceResult { pub clean: f64, pub dirty: f64, pub accrued: f64, } impl PriceResult { pub fn new(clean: f64, dirty: f64, accrued: f64) -> Self { Self { clean, dirty, accrued, } } }