Function from_iter

Source
pub fn from_iter<T>(iter: T) -> Result<NCMFile, ParseError>
where T: Iterator<Item = u8> + Clone,
Expand description

Parse the ncm file with iterator. Recommended if you have an ncm file stored in Vec or slice.

ยงExample

// Open file and store it in Vec.
let mut ncm_file = std::fs::read("xxx.ncm").unwrap();

// Parse it with `from_iter`
let parsed_ncm_file = ncm_parser::from_iter(ncm_file.into_iter()).unwrap();