Commit Graph

9 Commits

Author SHA1 Message Date
Trangar ad7ddebff3 Allow serde types to be Decode/Encoded (#434)
* Added support for #[bincode(serde)] attribute on fields, added SerdeToBincode helper struct

* Switch to using Compat/BorrowCompat

* Moved all the serde features and functions to its own module

* Fix broken link

* Added support for the bincode(with_serde) attribute in enum variants

* Updated the main documentation on serde, fixed an example not compiling under certain feature flag combinations

* Added #[serde(flatten)] to the list of problematic attributes

* Added better error reporting on invalid attributes
2021-11-09 10:08:47 +01:00
Trangar cc13be30d4 split off BorrowDecode from Decode in bincode_derive (#432)
* split off BorrowDecode from Decode in bincode_derive

* Added test case for issue #431

* Fixed Cow implementation having the wrong constraint, added BlockedTODO for cow implementation specialization

* Re-exported the Decode and Encode traits in the crate root

* Removed outdated comments

* Removed some :🇩🇪:Decode that were introduced by the merge
2021-11-07 10:57:35 +01:00
Trangar b4c46a789a Fixes for 427 (#428)
* Made bincode_derive handle empty lines of docs correctly
* Made bincode_derive properly support const generics
* Added support for enums with variants with fixed values
2021-11-07 10:31:15 +01:00
Lena Hellström e232454936 Refactor and rename encoders 2021-10-17 16:22:14 +02:00
Trangar a27b63b7fa Make bincode_derive 0 dependencies (#409)
Removed `syn`, `quote` and `proc_macro2` dependency
2021-10-12 15:53:02 +02:00
Victor Koenders 6361ad7d69 Made clippy also check _derive, fixed clippy warnings 2021-09-21 10:00:53 +02:00
Lena Hellström c83c36333d Add enum encode/decode derive 2021-09-20 23:06:25 +02:00
Lena Hellström 8241e6c656 Add generic bound support to derive 2021-09-20 16:27:13 +02:00
Victor Koenders bab0cf4bd1 Started working on bincode_derive 2021-09-13 13:20:47 +02:00