Commit Graph

155 Commits

Author SHA1 Message Date
David Tolnay
15b2714058 Merge pull request #1015 from spinda/with-variant
implement (de)serialize_with for variants
2017-09-09 10:49:24 -07:00
David Tolnay
9ce107de25
Merge pull request 963 from sfackler/u64-identifier
Conflicts:
    serde_derive/src/de.rs
2017-09-08 21:35:41 -07:00
Steven Fackler
95407a4ca5 Support field ident deserialization from u32 2017-09-05 21:55:33 -07:00
Steven Fackler
2fe9a860cd Inform serializers about skipped fields.
Closes #960.
2017-09-05 21:55:33 -07:00
David Tolnay
d4042872f5
Release 1.0.12 2017-09-04 11:11:44 -07:00
Michael Smith
9fc180e62f
Implement deserialize_with for variants
Complements variant serialize_with and closes #1013.
2017-08-14 14:41:05 -07:00
Michael Smith
5b815b7001
Implement serialize_with for variants
As discussed in #1013, serialize_with functions attached to variants receive an
argument for each inner value contained within the variant. Internally such a
function is wired up to the serializer as if the variant were a newtype variant.
2017-08-14 11:17:08 -07:00
David Tolnay
4831482695
Doc comment on statement is not used by rustdoc
Fixes #1014.
2017-08-05 23:35:14 -07:00
David Tolnay
26098ed877
Release 1.0.11 2017-07-27 00:56:28 -07:00
David Tolnay
f36a1e0895
Inherit the visibility of remote struct definition 2017-07-25 23:52:06 -07:00
David Tolnay
83537c95e1
Release 1.0.10 2017-07-11 21:19:24 -07:00
David Tolnay
9ecb0839de
Release 1.0.9 2017-06-29 20:21:29 -07:00
David Tolnay
1d3e921ba6
Fix deserializer bounds on remote derive 2017-06-29 20:12:44 -07:00
Steven Fackler
8e8694261b Fix identifier deserialization from non-u32
Closes #962
2017-06-19 20:23:14 -07:00
David Tolnay
4fdba725fe
Revert "Support deserialization of struct keys from integers"
This is not as useful as expected because the Serializer does not know the real
index of each struct field being serialized. The best it can do is keep a
counter, which goes wrong if fields are conditionally skipped.

This reverts commit eec7101894.
2017-06-18 09:11:21 -07:00
Steven Fackler
eec7101894 Support deserialization of struct keys from integers
serde-cbor supports a "packed" serialization flag which causes keys to
be serialized as their indices, but the deserializer currently has to
hardcode support for this format. We can simply support deserialization
of struct keys from integers as we already do for enum variants.
2017-06-17 18:12:07 -07:00
David Tolnay
fd3d1396d3
Release 1.0.8 2017-05-24 00:17:27 -07:00
David Tolnay
c47b4c8e0b
Release 1.0.7 2017-05-19 17:00:31 -07:00
David Tolnay
3d7aad1e7b
Release 1.0.6 2017-05-17 08:20:54 -07:00
David Tolnay
4d5e450054
Release 1.0.5 2017-05-14 12:53:48 -07:00
David Tolnay
c68b959696
Release 1.0.4 2017-05-10 20:05:22 -07:00
David Tolnay
58e30eaee4
Release 1.0.3 2017-05-10 10:15:39 -07:00
David Tolnay
8fafc7420c
Release 1.0.2 2017-04-27 12:32:30 -07:00
David Tolnay
bea1c5b0f5
Remove trailing whitespace 2017-04-27 12:31:13 -07:00
Ted Driggs
2440b59aae Address feedback on PR #905
* Added error test when deny_unknown_fields enabled
* Fixed next_relevant_key to use absolute paths
2017-04-27 12:21:32 -07:00
Ted Driggs
873cfbe9ab Fix #816 - adjacently-tagged enums honor deny_unknown_fields 2017-04-27 11:24:09 -07:00
David Tolnay
c7901e532e
Release 1.0.1 2017-04-23 16:40:56 -07:00
David Tolnay
d7ccef0cac
Release 1.0.0 2017-04-20 08:19:31 -07:00
David Tolnay
2d465415c5
Take credit 2017-04-20 08:13:46 -07:00
David Tolnay
bc2d637112
Cut an internals release 2017-04-20 08:11:31 -07:00
David Tolnay
cf1cdadc77
Fix some rustfmt screwups 2017-04-19 15:56:22 -07:00
David Tolnay
d1253cb193
Minimal serde_derive documentation
Fixes #886.
2017-04-19 14:43:53 -07:00
David Tolnay
0240814677
Update post-merge html_root_urls 2017-04-19 14:32:04 -07:00
David Tolnay
7a7d4c6364
Format in rfc style 2017-04-18 14:23:21 -07:00
David Tolnay
6279b0d930
Resolve merge conflicts 2017-04-17 14:25:29 -07:00
David Tolnay
a778425d0f
Merge branch 'origin/master' into 'origin/1.0'
Conflicts:
    serde/Cargo.toml
    serde/src/de/impls.rs
    serde/src/ser/impls.rs
    serde_derive/Cargo.toml
    serde_test/Cargo.toml
2017-04-17 14:18:33 -07:00
David Tolnay
d4d2061a2e
Release 0.9.14 2017-04-17 07:33:45 -07:00
David Tolnay
c13a37d4db
Rename VariantAccess methods to not conflict with Deserializer 2017-04-15 12:35:04 -07:00
David Tolnay
cdfd445528
Generate deserialize impls for identifiers 2017-04-14 21:53:48 -07:00
David Tolnay
f9535a4d67
Remove "item" terminology in favor of "container"
The docs have been using "container" for a long time.
2017-04-14 15:52:58 -07:00
David Tolnay
6d55501dab
Replace "codegen" with "derive" 2017-04-14 15:42:27 -07:00
David Tolnay
e77e7c4bba
Rename Deserializer::deserialize to deserialize_any 2017-04-14 12:52:57 -07:00
David Tolnay
31cec05712
Access traits 2017-04-14 12:24:35 -07:00
David Tolnay
3f920f645c
License boilerplate 2017-04-13 17:34:42 -07:00
David Tolnay
ea8fb97beb
Format in rfc style 2017-04-13 12:32:29 -07:00
David Tolnay
78407e19a9
Export Formatter directly for generated code 2017-04-13 12:02:16 -07:00
David Tolnay
dc7ab2696a
Point html_root_url to docs.rs 2017-04-13 11:31:29 -07:00
David Tolnay
4f39766211
Fix paths to readme files 2017-04-13 10:37:24 -07:00
David Tolnay
0b7accf86c
Remove unused unstable flag from serde_derive 2017-04-10 17:29:59 -07:00
David Tolnay
1985cfc955
Merge branch 'origin/1.0' into 'origin/identifier'
Conflicts:
    serde_derive/src/ser.rs
2017-04-10 12:37:41 -07:00