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

Feature request: serialize_all = "snake_case" #21

Closed
TeXitoi opened this issue Apr 23, 2018 · 3 comments
Closed

Feature request: serialize_all = "snake_case" #21

TeXitoi opened this issue Apr 23, 2018 · 3 comments

Comments

@TeXitoi
Copy link

TeXitoi commented Apr 23, 2018

It would be great to have a serialize_all feature à la serde rename_all. https://serde.rs/container-attrs.html

This crate may be interesting: https://crates.io/crates/heck

Maybe with a spec and some insight, I might try to do it myself if I found the time.

@Peternator7
Copy link
Owner

Makes a lot of sense! Let me think a little more about this feature, and I'll get back to you.

@azriel91
Copy link
Contributor

Hiya, I'm also keen on having this feature; if I made it happen would you take it?

azriel91 added a commit to azriel91/strum that referenced this issue Sep 18, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 18, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 18, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 18, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 20, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 20, 2018
azriel91 added a commit to azriel91/strum that referenced this issue Sep 20, 2018
Peternator7 pushed a commit that referenced this issue Sep 26, 2018
* Run rustfmt over repository.

* Bump `syn` to 0.15

* Implemented ability to `serialize_all` using cases from `heck`.

Issue #21

* Use `path` and `version` in dependency specifications.

Issue #21

* Updated documentation.

Issue #21

* Added `CHANGELOG.md`.

* Also convert case when deriving `Display`.

Issue #21

* Added `EnumDiscriminants` derive.

Issue #33

* Added the ability to rename derived `EnumDiscriminants`.

Issue #33

* Updated `README.md` and lib.rs docs.

Issue #33

* Updated `CHANGELOG.md`.

Issue #33

* WIP: refactoring to allow attributes on discriminants enum.

* Use single `strum_discriminants` top level attribute.

Issue #33

* Allow multiple declarations of `strum_discriminants` attribute.

Issue #33

* Pass through all other attributes to discriminant enum.

Issue #33

* Add `impl From<MyEnum> for MyEnumDiscriminants`.

Issue #33

* Add `impl<'_enum> From<&'_enum MyEnum> for MyEnumDiscriminants`.

Issue #33

* Added complex case test for `From` derivation.

Issue #33

* Added docs to some helper functions.

* Added docs about `From` impls.

Issue #33
@Peternator7
Copy link
Owner

Available in strum 0.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants