pub trait IsDefault {
// Provided method
fn is_default(&self) -> bool
where Self: Default + PartialEq { ... }
}Expand description
Adds a method to check the current data structure matches the default for the type
use ot_tools_io::{IsDefault, BankFile};
let mut bank = BankFile::default();
assert_eq!(bank.is_default(), true);
bank.datatype_version = 190;
assert_eq!(bank.is_default(), false);