1 2 3 4 5 6 7 8 9 10 11 12
#[derive(Debug, Clone, PartialEq)] pub struct BalanceSnapshot { pub asset: String, pub free: f64, pub locked: f64, } impl BalanceSnapshot { pub fn total(&self) -> f64 { self.free + self.locked } }