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

Serialize doc comments #1430

Closed
swfsql opened this issue Nov 28, 2018 · 4 comments
Closed

Serialize doc comments #1430

swfsql opened this issue Nov 28, 2018 · 4 comments

Comments

@swfsql
Copy link

swfsql commented Nov 28, 2018

I'll point to a related suggestion from toml-rs. On that issue, Alex pointed out that serde doesn't exposes the doc comments, and if it's feasible, I'd like to suggest such feature.

@dtolnay
Copy link
Member

dtolnay commented Nov 29, 2018

That's a neat idea! I am closing the issue because I would prefer not to support this in Serde, but you could implement your own derive macro using Syn that makes doc comments available to a toml serializer.

@SOF3
Copy link

SOF3 commented Sep 9, 2020

@dtolnay could you elaborate on why this (or in general, passing other metadata attributes to serializers) is not suitable in syn? I don't see how something like dtolnay/serde-yaml#145 can be integrated with another proc macei easily, without rewriting/copying the whole serialization interface.

@andylokandy
Copy link

@dtolnay could we support it under a feature flag?

@bestouff
Copy link

I would really love that to serialize configuration files

@serde-rs serde-rs locked and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants