Using the wrapped [de]serialization does come with a small CPU cost and a less small memory cost, so I've made this an optional feature. The user-visible API for this is a new variant for the ser::Error and de::Error types that wraps an inner error along with a path, and corresponding pretty-printed error messages for those. I'd have preferred an Error struct carrier for metadata and an ErrorKind enum here but I think this is a reasonable non-breaking solution.
RUST-1874
Using the wrapped [de]serialization does come with a small CPU cost and a less small memory cost, so I've made this an optional feature. The user-visible API for this is a new variant for the
ser::Error
andde::Error
types that wraps an inner error along with a path, and corresponding pretty-printed error messages for those. I'd have preferred anError
struct carrier for metadata and anErrorKind
enum here but I think this is a reasonable non-breaking solution.