Function deserialize

Source
pub fn deserialize<'a, I, T>(
    bytes: &'a Vec<u8>,
    string: &'a mut String,
    input: I,
) -> Result<T>
where I: AsRef<Path>, T: Deserialize<'a>,
Expand description

Deserialize bytes(file contents) to ClassMap.

  • string: new String(To avoid XML ownership error.)

§Errors

  • Missing extension.
  • If the input extension is not hkx or xml.
  • Incorrect syntax in the input path file.(DeError)

See serde_hkx::errors::de::Error for possible errors that may occur.