Commit Graph

389 Commits

Author SHA1 Message Date
leopardracer 92edfe973c Update mod.rs (#783) 2025-06-17 13:08:44 +02:00
Ross Lannen 6c1b0cd2c7 Implement core::error::Error for error types. (#780) 2025-05-09 07:40:37 +02:00
Ada Alakbarova 5a8ff74ab0 fix typo (#776) 2025-04-09 09:21:37 +00:00
calin-tataru-anaplan 5c079b9af6 Add seed decode function (#772) 2025-04-01 22:44:32 +02:00
Jonas Pleyer b2837bef3f derive `Debug` and simplify marker structs in config (#761)
* derive Debug for marker types

- this will also implement Debug for the derived Configuration type

* migrate to marker structs without fields
2025-03-12 14:51:36 +01:00
Lena Hellström 7610408399 bump version to 2.0.1 (#760) 2025-03-10 18:27:15 +00:00
Lena Hellström ee23e86743 Derive Debug for Configuration (#759) 2025-03-10 18:07:44 +00:00
Trangar bd694430e4 2.0.0 stable (#742)
Prepare for 2.0.0 stable release

---------

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2025-03-06 16:58:40 +00:00
Lena Hellström 2c87442fe6 Decode context (#749)
Add an optional context for decoding allowing additional data to be passed to decoded structs.

---------

Co-authored-by: branchseer <dk4rest@gmail.com>
2025-03-06 09:54:43 +00:00
Lena Hellström c02d52068e make serde decode api consistent (#748) 2025-03-03 12:16:45 +00:00
Bogdan Opanchuk 8e86cdfdd4 Expose types implementing `serde::Serializer` and `Deserializer` (#729)
* Expose types implementing serde::Deserializer

* Gate IoReader import
2025-03-02 20:34:18 +01:00
Trangar 4488a6496a Document making serde an optional dependency (#746) 2025-03-02 16:59:41 +01:00
Trangar f98bc70757 Fix CI and clippy (#747)
* Fix CI and clippy

* Fix CI

* Disable code coverage
2025-03-02 16:48:16 +01:00
Влад 4ca0e66946 impl basic traits for `Compat` and `BorrowCompat` (#734) 2024-12-06 08:15:21 +01:00
Trangar 7d402398cd Fixed new clippy lints (#721)
* Fixed new clippy lints

* Fixed doc formatting warning

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2024-08-07 10:21:30 +02:00
Trangar f737f21250 Fixed a warning in a derive test that would cause CI to fail (#716)
* Fixed a warning in a derive test that would cause CI to fail

* Fixed new clippy warning

* Commented out breaking cross builds

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2024-05-28 10:39:05 +02:00
Vrtgs 4dd792f5fa Fixed #707 (#708)
implemented `Decode` and `BorrowDecode` for Rc<str>
2024-03-21 10:27:32 +01:00
dependabot[bot] 3dee0d1a8c Update virtue requirement from 0.0.15 to 0.0.16 (#692)
* Update virtue requirement from 0.0.15 to 0.0.16

Updates the requirements on [virtue](https://github.com/bincode-org/virtue) to permit the latest version.
- [Release notes](https://github.com/bincode-org/virtue/releases)
- [Commits](https://github.com/bincode-org/virtue/compare/v0.0.15...v0.0.16)

---
updated-dependencies:
- dependency-name: virtue
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed warning that was causing compile issues

* Fixed failing test in validating error size

* Removed broken cross-compile tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Victor Koenders <git@trang.ar>
2024-03-17 19:10:10 +01:00
Trangar e0e5402094 Fixed broken commit to trunk (#687)
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-12-15 08:08:38 +01:00
mzachar 67564d2bd4 Implement Encode & Decode for Wrapping<T> types (#686)
* Implement Encode & Decode for Wrapping<T> types

* Implement Encode & Decode for Reverse<T> types
2023-12-15 06:45:27 +00:00
Richard Pringle 8f3f84ae94 Use const functions where possible (#684) 2023-12-14 11:56:51 +01:00
Sebastian Hahn b31bb67c59 Add getters for current configuration values (#681)
This was inspired by suggestions provided in #598, thanks a lot to
@VictorKoenders.

Fixes #598.

Co-authored-by: Trangar <gpg@trangar.com>
2023-12-11 09:57:32 +01:00
Lorenzo 4933019c44 Compat and BorrowCompat Debug and Display implementations (#670)
* feat: added Display and Debug implementations for Compat and BorrowCompat

* chore: added Compat and BorrowCompat Display and Debug tests

* chore: fixed imports and linter errors
2023-10-21 12:53:43 +02:00
Trangar fb2c928c70 Fix inconsistent naming between serde and non-serde functions (#671)
* Fix inconsistent naming between serde and non-serde functions

* Updated references from old deprecated function

---------

Co-authored-by: Victor Koenders <git@trang.ar>
2023-10-15 15:03:09 +02:00
Trangar e03c9b06db Added unty dependency and added type checks (#667)
* Added unty dependency and added type checks

* Bumped unty 0.0.2

* Bump unty to 0.0.3

* Removed unneeded + Sized requirements
Optimize encode for [T; N]
Made BinaryHeap<T> proxy to Vec<T>
Made VecDeque decode/borrowdecode proxy to Vec<T>
Optimize VecDeque::<u8>::Encode to write 2 slices directly
Optimize Vec<u8> borrowdecode implementation

---------

Co-authored-by: Victor Koenders <git@trang.ar>
2023-09-28 17:32:11 +02:00
Trangar 70fefd6dcc Reverted 'static constraint on T in Vec<T> and [T; N] (#663) 2023-09-19 14:58:49 +02:00
Trangar 0d7e7950cb Fixed a new clippy warning (#661)
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-09-15 13:37:27 +02:00
dullbananas 70b22d4dc0 Allow generics in impl_borrow_decode (#635)
* Allow generics in impl_borrow_decode

* Use impl_borrow_decode for PhantomData

* Update impls.rs

* Update mod.rs
2023-06-19 15:46:45 +02:00
Lachezar Lechev 48783ba725 fix(doc): broken intra link (#634) 2023-05-14 13:15:00 +00:00
Trangar 958b439c38 Release rc.3 (#628)
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 16:12:47 +02:00
Trangar dc468b4bed Made arrays never encode their length (#625)
* Made arrays with 32 elements or less never encode their length

* Removed `write_fixed_array_length` and `skip_fixed_array_length` as this was based on incorrect assumptions on how serde and bincode 1 works

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 15:09:33 +02:00
Trangar 9880abe499 Improved encoding and decoding speed of Vec<u8> (#619)
* Improved encoding and decoding speed of Vec<u8>

* Added black_box calls to benches/string.rs
Added a SizeWriter because someone finally has a benchmark to show it's faster

* Improved performance for `impl<T> Encode for [T]`

* Added #[inline] to `impl Encoder for EncoderImpl`

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 11:45:47 +02:00
Trangar 3aa269bfea Fixed new clippy warnings (#617)
* Fixed new clippy warnings

* Undid breaking all the tests

* Fixed more clippy warnings

---------

Co-authored-by: Victor Koenders <git@trang.ar>
2023-03-30 11:06:34 +02:00
Trangar 55d66480f5 Fixed new clippy lint in rust 1.65.0 (#603) 2022-11-22 16:25:18 +01:00
odysa cbf4d46073 feat: add DecodeError::Other (#602) 2022-11-21 13:33:52 +01:00
trevyn cb46ce13b4 Move generated files to `target/generated/bincode` (#600) 2022-11-03 09:13:09 +01:00
Trangar 00c5cb0ff0 Release 2.0.0-rc.2 (#588) 2022-10-04 13:27:43 +02:00
Trangar b2977bd3ed Added `[serde(tag)]` to the list of tags that are known to give issues (#584)
* Added `[serde(tag)]` to the list of tags that are known to give issues

* Removed the old warning about serde and no-std. Added references to the documentation in the serde::DecodeError enum
2022-10-04 11:42:26 +02:00
Gino Valente c179d2de69 Allow decode with custom DeserializeSeed (#586) 2022-10-02 11:35:16 +02:00
Vincent Rouillé 1b5eab9fcf Extended BorrowDecode for HashMap to support custom hashers (#585) 2022-10-02 10:12:14 +02:00
trevyn 6d995a74c7 Document configuration generics (#581)
Co-authored-by: Trangar <gpg@trangar.com>
2022-09-28 08:00:40 +00:00
Gerd Zellweger 954abe415e Implement Encode for tuples with up-to 16 elements. (#583)
This makes it match the implementation for Decode which is
already supports up to 16 fields.

Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>

Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
2022-09-28 09:42:04 +02:00
trevyn cafb13eb95 Clarify config::legacy() doc to match config::standard() (#580) 2022-09-17 17:22:31 +02:00
Gimgim ac44658bfb Document what the usizes are for (#546) (#577)
* Document what the usize is for

* Document the usize

Co-authored-by: Trangar <gpg@trangar.com>
2022-08-18 17:47:19 +00:00
Trangar c763e2f11e Implement Default for Configuration (#575) 2022-08-18 17:14:07 +00:00
Trangar 88ab23f544 Made `peek_read` take `&mut self` (#572) 2022-08-18 16:54:21 +02:00
Trangar 974abe8661 Fixed the clippy Eq warning. (#574)
Added DecodeError::Io
Removed `PartialEq` on DecodeError
2022-08-18 15:57:18 +02:00
Sabrina Jewson 035baf735f Implement `Decode` for `Box<str>` (#562) 2022-07-23 11:56:42 +02:00
Maciej Hirsz bd07adea66 Shrink `DecodeError` from 48 to 32 bytes on 64-bit arch (#553)
* Shrink `DecodeError` to 32 bytes on 64-bit arch

* Nul with a single l

* fmt

* Consider feature combinations for error sizes

* Remove superfluous `any`

* fmt

* Box SystemTime in EncodeError
2022-06-15 20:50:09 +02:00
Maciej Hirsz 229b597a84 Add impls for Rc<[T]> and Arc<[T]> (#552) 2022-06-15 07:47:26 +02:00