You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there seems to be no support for throwing custom error types. This is useful for any type that needs to do arbitrary verification during (de)serialization, e.g. a signature type that needs to check whether the point is on the elliptic curve.
There should probably be a way to throw custom ReadErrors and WriteErrors, e.g. by using map_err() on some error type within the implementations of SchemaRead::read() and SchemaWrite::write(). This is analogous to this use case in serde: https://serde.rs/convert-error.html