Skip to main content

process_serde_with

Function process_serde_with 

Source
pub fn process_serde_with<'a, I, F, G, T>(
    bytes: &'a [u8],
    input: I,
    on_xml: G,
    on_other: F,
) -> Result<T, Error>
where I: AsRef<Path>, F: FnOnce(ClassMap<'a>) -> Result<T, Error>, G: FnOnce(ClassMap<'_>) -> Result<T, Error>,
Expand description

Deserializes serialized HKX data into a [ClassMap] and applies a format-specific transformation.

This is useful when the deserialized class data needs to be modified before constructing higher-level types such as Hkanno.

ยงErrors

Returns an error if:

  • the input path has no extension.
  • the extension is unsupported.
  • deserialization fails.
  • the handler returns an error.