poe_data_tools 1.0.0

A library for working with Path of Exile game data
Documentation
use crate::file_parsers::{
    FileParser, VersionedResult, VersionedResultExt, shared::utf16_bom_to_string,
};

pub mod parser;
pub mod types;
use parser::parse_et_str;
use types::*;

pub struct ETParser;

impl FileParser for ETParser {
    type Output = ETFile;

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

        parse_et_str(&contents).unversioned()
    }
}