Function a2lfile::load [−][src]
pub fn load(
filename: &OsStr,
a2ml_spec: Option<String>,
log_msgs: &mut Vec<String>,
strict_parsing: bool
) -> Result<A2lFile, String>
Expand description
Load an a2l file
a2ml_spec is optional and contains a String that is valid A2ML that can be used while parsing the file in addition to the A2ML that might be contained inside the A2ML block in the file. If a definition is provided here and there is also an A2ML block in the file, then the definition provided here will be tried first during parsing.
log_msgs is a reference to a Vec
strict_parsing toggles strict parsing: If strict parsing is enabled, most warnings become errors.
let mut log_msgs = Vec::<String>::new();
match a2lfile::load(&std::ffi::OsString::from("example.a2l"), None, &mut log_msgs, true) {
Ok(a2l_file) => {/* do something with it*/},
Err(error_message) => println!("{}", error_message)
}