David Tolnay
e74925bc43
Merge pull request #1695 from jplatte/rename_all_fields
...
Add #[serde(rename_all_fields = "foo")] attribute
2023-07-27 00:45:45 -07:00
Jonas Platte
56be1c203e
Pass RenameRule, RenameAllRules by value
2023-07-27 09:19:42 +02:00
Jonas Platte
2f9bf4d3eb
Add #[serde(rename_all_fields = "foo")] attribute
2023-07-27 09:19:42 +02:00
David Tolnay
dd9913675d
Ungroup imports
2023-07-25 23:06:34 -07:00
David Tolnay
26e2ef001c
Delete deprecated AsciiExt extension trait import
...
This has been superseded by inherent methods since Rust 1.26.
2023-07-25 21:07:33 -07:00
David Tolnay
b7bad3a165
Restore compatibility with rustc 1.31 in RenameRule error
...
str::escape_debug wasn't stabilized until 1.34, whereas serde_derive
currently supports an oldest version of 1.31.
2021-01-23 14:40:44 -08:00
David Tolnay
4e002ece07
Provide list of recognized rename rules on parse error
2021-01-23 14:38:20 -08:00
David Tolnay
eaccae2c46
Fix UPPERCASE rename rule variant to follow idiomatic variant naming
...
This shouldn't have been named this way in PR #1132 .
2021-01-23 14:27:33 -08:00
David Tolnay
990a502c39
Parse rename rules based on table of rules
...
This will make it possible to reuse the same table of recognized rules
in the parse error message.
2021-01-23 14:24:21 -08:00
David Tolnay
51d4563ed1
Move RenameRule parse error message to a Display impl
2021-01-23 14:13:47 -08:00
David Tolnay
7db0982e58
Add error type to use for RenameRule parsing
2021-01-23 14:09:58 -08:00
David Tolnay
ed04824f10
Move RenameRule parse from trait fn to associated
...
This will allow updating it to return an Err that borrows the input
string, which is not possible with FromStr.
2021-01-23 14:07:59 -08:00
David Tolnay
b87f8f35ee
Merge pull request 1447 from vincascm/master
2018-12-27 15:29:16 -05:00
vinoca
7e82809592
Fix tests fail since modify Container attributes rename_all
2018-12-20 14:30:23 +08:00
vinoca
0dae5db30e
Support Container attributes rename_all only for Serialize or Deserialize
2018-12-19 09:46:52 +08:00
David Tolnay
58b3af4c29
Copyright/license headers
...
The following changes are included:
- Delete per-file license notices at the top of each file.
- Delete the first paragraph of LICENSE-MIT (an inaccurate
pseudo-copyright line), leaving only the text of the MIT license.
Nothing about the license of Serde code has changed, only our
understanding of how to correctly communicate that license has changed.
This mirrors an equivalent change being applied in the rust-lang/rust
repository.
2018-11-24 15:53:09 -08:00
Richard Dodd
80765eb453
Make suggested changes
2018-09-30 15:17:47 +01:00
Richard Dodd
f1073dca04
Make the recommended changed from code review.
2018-09-30 12:34:52 +01:00
Richard Dodd
da65fe5a52
Some docs
2018-09-29 15:06:23 +01:00
David Tolnay
cbfdba3826
Use rustfmt to wrap and format comments
2018-08-14 22:32:27 -07:00
David Tolnay
3859f58d9b
Move derive internals into serde_derive crate
...
We can continue to publish serde_derive_internals independently but
serde_derive no longer has a dependency on it. This improves compile
time of serde_derive by 7%.
2018-05-05 23:46:30 -07:00