HasFileVersionField

Trait HasFileVersionField 

Source
pub trait HasFileVersionField {
    // Required method
    fn check_file_version(&self) -> Result<bool, OtToolsIoError>;
}
Expand description

A type has a file patch version field which needs implementations to handle validation

Required Methods§

Source

fn check_file_version(&self) -> Result<bool, OtToolsIoError>

Method to verify if the data file version field is valid for the given type.

use ot_tools_io::{HasFileVersionField, OctatrackFileIO, BankFile};
// true for valid version values
assert!(BankFile::from_data_file(&path).unwrap().check_file_version().unwrap())

Implementors§