Victor Koenders
dae645f675
Joined the 2 Sealed traits into a single one
2021-10-21 14:27:03 +02:00
Victor Koenders
707d0d238f
Made all encode and decode functions always require a Config, removed _with_config functions
2021-10-21 14:19:40 +02:00
Victor Koenders
dd7e8e8e43
Changed bincode version to 2.0.0-alpha.0
2021-10-21 13:39:45 +02:00
Victor Koenders
f70e94a427
Added dedicated error for `std::path::Path` encoding. Fixed broken link in documentation.
2021-10-21 13:29:03 +02:00
Victor Koenders
07b3c8cd76
Made the Decode of [T; N] properly drop all instances of T when an error has occured
2021-10-21 11:57:24 +02:00
Victor Koenders
151edf46d3
Included spec.md into cargo's documentation, fixed the issues, changed the [u8; N] implementations to [T; N]
2021-10-21 11:57:16 +02:00
Lena Hellström
684f2562b1
Config rewrite ( #412 )
...
Rewrite the config system to be slightly more friendly to adding new options
2021-10-17 21:07:31 +02:00
Victor Koenders
4807ea6be2
Added warning on unused lifetimes, fixed warnings
2021-10-17 16:43:18 +02:00
Lena Hellström
e232454936
Refactor and rename encoders
2021-10-17 16:22:14 +02:00
Victor Koenders
61c1e8a7cd
Added badges to the functions to indicate which features they require
2021-10-17 15:00:14 +02:00
Victor Koenders
b480d2b3b3
Added documentation for the src/ module. Added warning for missing docs, fixed missing docs in src/de/mod.rs
2021-10-14 18:04:13 +02:00
Victor Koenders
a8680ce1d8
Started working on documentation
2021-10-12 18:18:43 +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
254b87c6eb
Moved all feature flags to src/features, made the CI run tests on all feature combinations
2021-09-22 16:23:27 +02:00
Lena Hellström
4b672de110
Enable non-slice readers
2021-09-22 15:08:52 +02:00
Victor Koenders
9c7fb85e0e
Added support for slices, str, fixed size arrays. Added lifetime to Decode trait
2021-09-22 12:03:00 +02:00
Victor Koenders
ffb565c405
Added config options for endian and int_encoding, added full coverage for all basic integer types
2021-09-22 10:40:27 +02:00
Victor Koenders
ccca6ee49e
Split Error into EncodeError and DecodeError
2021-09-19 10:52:21 +02:00
Victor Koenders
723bdd312a
Turned Config::INT_ENCODING back into a const, made a ton of varint_encode functions
2021-09-19 09:25:47 +02:00
Victor Koenders
bab0cf4bd1
Started working on bincode_derive
2021-09-13 13:20:47 +02:00
Lena Hellström
b7c0d1fac0
reorganize de/enc modules
2021-06-20 00:12:10 +02:00
Lena Hellström
e160c73acb
a fresh new start
2021-06-19 19:31:34 +02:00
Lena Hellström
e39a047b4b
prep branch for 2.0 work ( #379 )
...
* prep branch for 2.0 work
* switch to 2018 edition
* fix clippy issues
* fix tests
* fix warnings
* fix formatting
2021-04-08 14:54:31 +02:00
Lena Hellström
810086e473
fix linting ci error ( #377 )
2021-02-23 12:09:15 -08:00
Andy Goetz
5d6dfa1fb9
Update docs to highlight differences between DefaultOptions and functions ( #373 )
...
Due to historical reasons, the default options used by bincode for the
helper functions at the root of the crate differ from the options in
the `config` module.
Changing the default options is a breaking change, so until a decision
is made, we can at least document the current behavior.
2021-02-23 05:33:55 -08:00
Lena Hellström
00c43bf3b1
fix logic error in fill_buffer ( #336 )
2020-06-23 23:41:55 -07:00
Lena Hellström
a822c09d93
bump version to 1.3.0 ( #330 )
2020-06-04 21:20:43 -07:00
Lena Hellström
752262a03d
update documentation to reflect new config options ( #329 )
2020-06-04 21:20:00 -07:00
Lena Hellström
e80f61b9da
Reject trailing bytes ( #198 )
2020-05-26 12:40:04 -07:00
Lena Hellström
f9faa33686
refactor config module ( #323 )
...
Break up the config module into one submodule per configuration
option. This commit also changes the default configuration with
the new options system to be varint (the old system still uses
fixint to preserve backwards compatibility).
2020-05-18 22:46:12 -07:00
Lena Hellström
c27e9c6874
Varint enum tags and lengths ( #306 )
...
Adds varint encoding to all numbers, including sequence lengths and enum discriminants. Varints are encoded according to the following scheme
1. If `u < 251`, encode it as a single byte with that value.
2. If `251 <= u < 2**16`, encode it as a literal byte 251, followed by a u16 with value `u`.
3. If `2**16 <= u < 2**32`, encode it as a literal byte 252, followed by a u32 with value `u`.
4. If `2**32 <= u < 2**64`, encode it as a literal byte 253, followed by a u64 with value `u`.
5. If `2**64 <= u < 2**128`, encode it as a literal byte 254, followed by a u128 with value `u`.
Signed integers are first encoded using zigzag format (see docs for details)
Co-authored-by: Maciej Hirsz <maciej.hirsz@gmail.com>
Co-authored-by: Nicole Mazzuca <nicole@strega-nil.co>
2020-05-18 17:07:10 -07:00
Lena Hellström
2355e48a7b
expose default options and serializers ( #310 )
...
Deprecate the old config system and make a refined version of the internal config system public. Doing allows the Serializer/Deserializer to be exposed since all of its generic type parameters are now public.
2020-04-16 15:23:07 -07:00
Lena Hellström
8839b0600d
Modernize CI ( #311 )
...
Switches our CI from Travis-CI to Github Actions. At the same time this also turns on clippy and rustfmt linting.
2020-03-24 14:33:13 -07:00
jean-airoldie
e2d8742743
Add contraints to {Serializer,Deserializer}Acceptor
...
This allows the user to retreive concrete types from the
serializer & deserializer output.
2020-01-23 09:23:48 +00:00
David Tolnay
6c4b23ce62
Release 1.2.1
2019-12-09 22:25:24 -08:00
Justin Starry
0215da2d29
Fix emscripten build failures due to lack of i128 support
2019-10-19 19:51:34 -04:00
Josh Matthews
293e9cea32
Release 1.2.0.
2019-09-24 14:16:47 -04:00
Josh Matthews
d4d13aa37c
Release 1.1.5.
2019-09-23 18:56:44 -04:00
David Tolnay
18da2c95d5
Release 1.1.4
2019-05-14 21:16:49 -07:00
David Tolnay
107a1930b5
Update documentation to 2018 edition
2019-04-30 01:18:32 -07:00
David Tolnay
c954d3352c
Remove unneeded ```rust from rustdoc
2019-04-30 01:15:01 -07:00
David Tolnay
0a67cf66e7
Release 1.1.3
2019-04-07 17:28:48 -07:00
David Tolnay
f5af5b992b
Define html_root_url
2019-02-16 11:28:17 -08:00
Diggory Hardy
a04c750960
Make i128 support automatic for supporting Rustc versions
...
Uses autocfg
2019-01-28 09:59:18 -05:00
Jeff Muizelaar
20da2c841a
Make config() inline(always)
...
Without this we end up generating code for all configs unless LTO is on.
2018-11-20 11:13:44 -05:00
Ty Overby
d8704644d7
format
2018-09-04 16:25:10 -07:00
Ashley Mannix
2ef9a06894
add support for 128bit numbers
2018-05-30 09:44:38 -07:00
Ty Overby
72f002cc0a
some comment fixes
2018-02-13 16:24:57 -08:00
Ty Overby
5081ac7c08
remove unused function type parameter
2018-02-07 20:23:07 -08:00
Ty Overby
24b007e194
public but hidden read types
2018-02-07 20:13:26 -08:00