-
Notifications
You must be signed in to change notification settings - Fork 85
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
Consider removing text::Encode in favour of serde::Serialize #97
Comments
I would be in favor of that. I should have thought of it before. @nox would you like to write a first proposal? Before you go all the way, I would suggest writing a small proof-of-concept first to make sure using serde is a viable path forward. |
Sure, I'll write a |
I pushed https://github.com/nox/serde_prometheus_labels earlier today. |
I published serde_prometheus_labels which provides its own |
How would this interact with a problem like the one in #75? I mean, |
Why not? |
I agree to this, but I would rather rely on serde and not be blocked on some missing implementation. It made the job for us, that's why I published that stuff as a separate crate. |
With #105 I don't think we should proceed here, i.e. I don't see the value of replacing the new traits. @nox I am closing here for now. Please comment here in case I am missing something. The above said I do believe implementing |
Serde's Serialize trait is implemented for dozens of types in the Rust ecosystem, its derive code is fairly well optimised, and it is the most popular serialization framework we have for Rust.
What do you think of removing the Encode trait in favour of Serialize, to get all the nice things there are in Serde for free?
The text was updated successfully, but these errors were encountered: