#[allow(dead_code)] pub struct Commodity { name: String, } #[allow(dead_code)] pub struct Account { name: String, commodity: Commodity, } #[allow(dead_code)] pub struct Posting { account: Account, amount: i64, commodity: Commodity, } #[allow(dead_code)] pub struct Transaction { text: String, payee: String, postings: Vec, } #[allow(dead_code)] pub struct Journal { pub commodities: Vec, pub accounts: Vec, pub transactions: Vec, } impl Commodity { fn new(name: &str) -> Commodity { Commodity { name: name.to_string() } } }