David Tolnay
fcc3c69a49
Range impl is defined when building with std
2017-03-09 12:04:02 -08:00
David Tolnay
350c2e835b
Remove duplicate ops::Range serialize impl
2017-03-09 11:57:36 -08:00
Robert O'Callahan
cc0d045f5c
Add Deserialize impl for std::ops::Range
...
Resolves #796
2017-03-10 08:39:34 +13:00
Robert O'Callahan
aebe1fddab
Add Serialize impl for std::ops::Range
2017-03-10 00:35:04 +13:00
David Tolnay
77ee306b57
Format serde with rustfmt 0.8.0
2017-03-08 21:11:17 -08:00
Jon Gjengset
0c2fed49e2
Add Deserialize impl for CStr
...
Fixes #810
2017-03-08 23:57:26 -05:00
David Tolnay
6d9397d573
Implement deserialize_enum for U32Deserializer
2017-03-07 09:05:33 -08:00
David Tolnay
dc9445f873
Release 0.9.11
2017-03-05 16:51:44 -08:00
David Tolnay
17bc40ec1c
Merge pull request #789 from nox/display
...
Introduce Serializer::collect_str (fixes #786 )
2017-03-05 16:47:22 -08:00
David Tolnay
2184fef82f
Add format_args example to collect_str
2017-03-05 16:43:31 -08:00
David Tolnay
7e1b5c6ce4
Neater collect_str variable name for rustdoc
2017-03-05 16:26:05 -08:00
David Tolnay
36da8a5cee
Error message geared toward serializer users
...
The previous message was targeted toward Serializer implementors, which is not
the group that will be seeing this message most often.
2017-03-05 16:24:48 -08:00
David Tolnay
fbe85f399d
Force no_std formats to implement collect_str in the future
2017-03-05 16:22:02 -08:00
David Tolnay
880b27b19e
Identical signature for std and no_std collect_str
2017-03-05 16:17:03 -08:00
David Tolnay
cc06f070d1
Use the existing CString error message
2017-03-05 13:59:18 -08:00
Jon Gjengset
d294a10e83
Only include ByteBuf when ser/de is on for std
2017-03-03 23:48:00 -05:00
Jon Gjengset
defcbef7ab
Use a non-stupid path for bytes::ByteBuf
2017-03-03 23:28:35 -05:00
Jon Gjengset
0d6d077e6a
Serialize and deserialize CString through [u8]
2017-03-03 18:05:08 -05:00
Jon Gjengset
be09fc9bbb
Remove unsafe Deserialize impl for CStr
...
See also https://github.com/rust-lang/rust/issues/40248
2017-03-03 17:34:01 -05:00
Jon Gjengset
fc9d78e26b
Use serialize_bytes for speed
2017-03-03 17:14:39 -05:00
Jon Gjengset
9f83164c40
Don't serialize trailing NULL
2017-03-03 17:14:28 -05:00
Jon Gjengset
857974ab8a
impls for null-terminated FFI string types
...
Fixes #800 .
2017-03-03 16:09:41 -05:00
David Tolnay
51ed9c2a40
Release 0.9.10
2017-02-28 12:45:39 -08:00
Anthony Ramine
a9a05350a9
Introduce Serializer::collect_str ( fixes #786 )
...
The default implementation collects the Display value into a String
and then passes that to Serializer::serialize_str when the std or collections
features are enabled, otherwise it unconditionally returns an error.
2017-02-28 12:11:47 +01:00
David Tolnay
fe9ea3b4b4
Fix needless_pass_by_value lint
2017-02-27 19:43:42 -08:00
Elliott Slaughter
a993630cf9
Fix documentation of serialize_tuple and SerializeTuple.
2017-02-27 14:00:21 -08:00
David Tolnay
59ec931d8f
Release 0.9.9
2017-02-24 13:57:52 -08:00
David Tolnay
4b3c5ea99e
Fix clippy lint in content serializer
2017-02-24 13:56:44 -08:00
David Tolnay
4da77e4200
Serialize to Content
2017-02-24 12:59:35 -08:00
David Tolnay
d797504407
Deserialize enums from &Content
2017-02-24 09:32:14 -08:00
David Tolnay
5e7883945b
Fix clippy lint in Content::unexpected
2017-02-22 18:16:51 -08:00
David Tolnay
a4bd6b9a96
Fix content's SeqDeserializer on no_std
2017-02-22 18:14:56 -08:00
Michael Mokrysz
4c253748c2
Compiles and fixes internally tagged testcases.
2017-02-23 01:05:44 +00:00
Michael Mokrysz
8f6e1fb5b3
Resolved error typing. Needs to adapt to Content::Map with non-String keys.
...
`EnumDeserializer` is being adapted from:
`serde_json::Value::Map<Vec<(String, Value)>>`
serde has a Map variant that allows non-String keys:
`serde::de::Content::Map<Vec<(Content, Content)>>`
There's a lot of assumptions in `EnumDeserializer` about `String` keys and I'm not sure what the adaptation should be.
2017-02-22 23:59:47 +00:00
Michael Mokrysz
4e665a71bd
Attempt to port serde_json::Value::deserialize_enum for ContentDeserializer is being derailed by what error types should be used.
2017-02-22 22:55:18 +00:00
David Tolnay
017e6d304f
Release 0.9.8
2017-02-21 10:59:42 -08:00
David Tolnay
89cbb81673
Include readme and licenses in crates.io archive
...
Fixes #772 .
2017-02-20 21:11:57 -08:00
David Tolnay
9a3c1243f4
Deserialization of Haskell style enums
2017-02-20 20:05:06 -08:00
Simon Sapin
772b22b427
Avoid some string allocations.
2017-02-20 18:36:38 +01:00
David Tolnay
7dad6426da
Merge pull request #774 from nox/limit-hints
...
Clamp hints coming from untrusted input to 4096
2017-02-19 13:51:21 -08:00
David Tolnay
792a5f7502
Also clamp the collection impls
2017-02-19 13:47:05 -08:00
Anthony Ramine
a4c738a9f3
Clamp hints coming from untrusted input to 4096
2017-02-19 14:29:41 +01:00
David Tolnay
e8651a52e7
Rustfmt
2017-02-12 22:15:59 -08:00
David Tolnay
964a2dd4d1
Release 0.9.7
2017-02-09 17:52:11 -08:00
David Tolnay
8a21bbc720
Merge pull request #755 from serde-rs/playground
...
Playground feature to get serde_derive picked up by integer32 playground
2017-02-09 17:50:39 -08:00
Jake Goulding
1d3044fa28
Add missing close backtick
2017-02-09 11:53:12 -05:00
David Tolnay
d1f0112bfb
Playground feature to get serde_derive picked up by integer32 playground
2017-02-08 12:37:40 -08:00
David Tolnay
3f25cd9a7e
No longer need ser::Error import
2017-02-08 08:17:43 -08:00
David Tolnay
529a1cfedb
Keyword no_std for serde and serde_derive
2017-02-08 07:40:02 -08:00
David Tolnay
219abd2e00
The performance is identical
2017-02-04 19:04:29 -08:00