David Tolnay
305fab7c16
fix(codegen): Support extern crate serde
not in toplevel module
2016-04-25 09:58:01 -07:00
David Tolnay
0439bb9d02
Deserialize impl for Box<[T]>
2016-04-17 20:59:26 -07:00
David Tolnay
87393b61bb
feat(codegen) skip_deserializing
2016-04-10 20:29:37 -07:00
Erick Tryzelaar
76b3dead9b
feat(serde): Add hooks for fixed-sized arrays
...
Closes #244
2016-02-23 05:15:44 -08:00
Erick Tryzelaar
49b0bfd257
feat(de): Remove dependency on the num
crate.
2016-02-21 21:22:58 -08:00
Erick Tryzelaar
4cb5ee0678
feat(impls): Add impls for std::net::SocketAddr{,V4,V6}
2016-02-21 20:21:21 -08:00
Erick Tryzelaar
b257084f3a
feat(impls): Add impls for std::net::Ip{,v4,v6}Addr
2016-02-21 20:21:21 -08:00
Erick Tryzelaar
740865b637
feat(de): Add an Error::unknown_variant error.
...
Closes #169
2016-02-21 16:26:52 -08:00
Erick Tryzelaar
de89f95f31
feat(codegen): Add support for #![serde(skip_serialize_if="$expr")]
...
This allows end users to use an arbitrary expression to decide whether
or not to serialize some field. This expression has access to all the
fields in the struct, but none of the internal state of the Serialize
implementation. For structs, serde implements this by creating a
temporary trait and implementing the struct for it. For struct variants,
the fields are copied by reference into a temporary struct first
before implementing the temporary trait.
This also fixes a bug where the serde_codegen wasn't making calls to
Serializer::serialize_{tuple,struct}_variant{,_elt}.
2016-02-18 19:13:55 -08:00
Erick Tryzelaar
561a373d19
Merge branch 'v0.6.x'
...
# Conflicts:
# serde/src/de/mod.rs
# serde_codegen/src/attr.rs
# serde_codegen/src/de.rs
# serde_codegen/src/lib.rs
2016-02-12 21:43:23 -08:00
Erick Tryzelaar
9ae47a261e
Merge branch 'v0.6.x'
...
# Conflicts:
# serde/src/de/impls.rs
# serde_codegen/src/de.rs
2016-01-28 09:49:15 -08:00
Erick Tryzelaar
4507eaec5b
Use deserializer.visit_string for PathBuf
2016-01-28 09:45:38 -08:00
Erick Tryzelaar
42b8b6153e
Merge branch 'v0.6.x' into master
...
# Conflicts:
# serde/Cargo.toml
# serde/src/ser/impls.rs
# serde_codegen/src/attr.rs
# serde_codegen/src/de.rs
# serde_codegen/src/field.rs
# serde_codegen/src/ser.rs
2016-01-18 12:45:39 -08:00
Erick Tryzelaar
bfa2b69193
feat(clippy): Use clippy for it's extra lints
2016-01-18 12:24:03 -08:00
John Heitmann
bfac1a581c
Implemented disallow_unknown
...
* Added codegen for disallow_unknown
* ... with new default to ignore unknown values during deserialization
* Added ContainerAttrs
2016-01-10 19:34:48 -08:00
Erick Tryzelaar
1a8a11e924
feat(impls): Add impls for num::{BigInt,BigUint,Complex,Ratio}
2015-12-01 09:03:08 -08:00
Erick Tryzelaar
42069ca669
Refactor tests to not use serde_json
2015-08-29 17:29:42 -07:00
Erick Tryzelaar
7fb2bd50bf
Add a string argument to Error::syntax()
2015-08-07 08:08:56 -07:00
Erick Tryzelaar
2aeb51ad51
Remove "_error" from de::Error::*_error
2015-08-07 07:53:22 -07:00
Erick Tryzelaar
6715fb6652
Rename visit_simple to visit_newtype
2015-07-31 07:22:13 -07:00
Erick Tryzelaar
5a56394814
Add test to deserialize variants from usize and &[u8]
2015-07-30 08:06:04 -07:00
Erick Tryzelaar
5dc245d2ce
Switch serializing Result to using simple enums
2015-07-30 08:06:04 -07:00
Erick Tryzelaar
2cb7d66767
Add test for deserializing a simple enum
2015-07-30 08:06:04 -07:00
Erick Tryzelaar
351b7039a8
Rename de::VariantVisitor::visit_{map,seq} to visit_{struct,tuple}
2015-07-30 06:45:21 -07:00
Erick Tryzelaar
6c9cebdcc3
Pass the variant fields and tuple lengths into visit_{enum,tuple,tuple_struct}
2015-07-30 06:45:21 -07:00
Erick Tryzelaar
4dd7345568
Simplify result serialization and deserialization
2015-07-22 10:44:43 -07:00
Erick Tryzelaar
5dae700aec
Pass struct field names to deserializer
2015-07-22 10:44:42 -07:00
Erick Tryzelaar
10f23dddfe
Rename named_* to use {enum,struct,unit}_*
...
This better reflects how they're used.
2015-07-22 10:44:42 -07:00
Erick Tryzelaar
482f92af61
Add a single driver for tests and benchmarks
2015-05-18 22:47:36 -07:00
Erick Tryzelaar
9dd5f9dc7a
Restructure directories to prep for syntex
2015-05-18 22:47:35 -07:00