pub trait CheckHeader {
// Required method
fn check_header(&self) -> bool;
}Expand description
Adds a method to verify if header(s) are valid in some data. See this thread to understand why this is useful: https://www.elektronauts.com/t/bank-unavailable-octatrack/190647/27
use ot_tools_io::{CheckHeader, read_type_from_bin_file, banks::BankFile};
let bank: BankFile = read_type_from_bin_file(&fpath).unwrap();
assert!(bank.check_header()) // true for valid header values