Currently, we write error conversion code manually, e.g. try_from/from.
This was fine when having a small code base and to have full control over the view try_froms/froms.
However, it is common Rust practice to use error conversion libs that do the code generation automatically. Especially for larger and growing code bases it simplifies error conversion.
Description
Currently, we write error conversion code manually, e.g.
try_from
/from
. This was fine when having a small code base and to have full control over the view try_froms/froms.However, it is common Rust practice to use error conversion libs that do the code generation automatically. Especially for larger and growing code bases it simplifies error conversion.
Typical error libs:
However there are a view other libs that can be considered and discussed, but anyhow and thiserror is publicly known.
A simple result type with auto conversions are also better for readability.
Goals
Simplifying and automating error code conversion.
Final result
Summary
To be filled when the final solution is sketched.
Tasks