use schist_models::account::Account; pub fn get_account_matchers() -> Vec bool>> { vec![ Box::new(|a| matches_bank_account(a)), Box::new(|a| matches_cash_account(a)), ] } fn matches_bank_account(account: &Account) -> bool { match account { Account { name, opening_balance: 0, opening_date, .. } => name == "My bank account" && *opening_date == "2024-08-01".parse().unwrap(), _ => false, } } fn matches_cash_account(account: &Account) -> bool { match account { Account { name, opening_balance: 0, opening_date, .. } => name == "My cash account" && *opening_date == "2024-08-01".parse().unwrap(), _ => false, } }