poe_data_tools 1.0.0

A library for working with Path of Exile game data
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod parser;
pub mod types;
use parser::parse_mtd_str;
use types::MTDFile;

use crate::file_parsers::{FileParser, VersionedResult, shared::utf16_bom_to_string};

pub struct MTDParser;

impl FileParser for MTDParser {
    type Output = MTDFile;

    fn parse(&self, bytes: &[u8]) -> VersionedResult<Self::Output> {
        let contents = utf16_bom_to_string(bytes)?;

        parse_mtd_str(&contents)
    }
}