Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core::ser::Error cannot derive Serialize/Deserialize #2581

Closed
bddap opened this issue Feb 15, 2019 · 1 comment
Closed

core::ser::Error cannot derive Serialize/Deserialize #2581

bddap opened this issue Feb 15, 2019 · 1 comment

Comments

@bddap
Copy link
Contributor

bddap commented Feb 15, 2019

core::ser::Error, defined in core/src/ser.rs, contains an io::ErrorKind. io::ErrorKind does not implement Serialize/Deserialize so Serialize/Deserialize can't be derived for core::ser::Error.

A Serialize/Deserialize impl is will be necessary in order to include structured error types in networked apis #2425.

@bddap
Copy link
Contributor Author

bddap commented Feb 16, 2019

Update: dtolnay, author of serde recommends using serialize_with serde-rs/serde#1480.

That should work. The solution is trivial; I'll close the issue.

@bddap bddap closed this as completed Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant