I'm currently developing a library for parsing the Image4 format found in boot images on Apple devices which is based on DER. This format has some constraints not related to the DER and I'd like to provide a custom error type that implements From<der::Error> and has some additional variants I need. Is this something that would be possible to add?
I think the best way to do it is to add associated Error types in the Decode and Encode traits and wherever needed. I'll be happy to provide a PR.
Here is an example of a file I want to parse if you'd like to understand my case better. This recursive structure also creates compile-time recursion when used with the read_nested method btw. Should I file an issue?
I'm currently developing a library for parsing the Image4 format found in boot images on Apple devices which is based on DER. This format has some constraints not related to the DER and I'd like to provide a custom error type that implements
From<der::Error>and has some additional variants I need. Is this something that would be possible to add?I think the best way to do it is to add associated
Errortypes in theDecodeandEncodetraits and wherever needed. I'll be happy to provide a PR.Here is an example of a file I want to parse if you'd like to understand my case better. This recursive structure also creates compile-time recursion when used with the
read_nestedmethod btw. Should I file an issue?