dtolnay / path-to-error

Find out path at which a deserialization error occurred
Apache License 2.0
320 stars 12 forks source link

Expose serde_path_to_error::Error constructor #18

Closed RReverser closed 1 year ago

RReverser commented 1 year ago

Currently, when using the serde_path_to_error::Deserializer manually, it's not possible to wrap the resulting error + track.path() into a serde_path_to_error::Error from outside the crate since its fields are hidden.

Users can create their own wrappers, but it would be more convenient to either make the fields public or expose an Error::new constructor for downstream users.

dtolnay commented 1 year ago

Added Error::new in 0.1.10.

RReverser commented 1 year ago

Thanks!