Skip to content

Commit

Permalink
Merge pull request #12 from Anders429/borrowed
Browse files Browse the repository at this point in the history
Allow zero-copy deserialization.
  • Loading branch information
Anders429 authored May 17, 2023
2 parents f5c2c9a + 8e6c3f2 commit 08c2a25
Show file tree
Hide file tree
Showing 4 changed files with 507 additions and 133 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## Unreleased
### Added
- `Deserializer` can now be configured to allow (or disallow) zero-copy deserialization.

## 0.4.0 - 2023-04-06
### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This crate provides more flexibility than `serde_test` at the expense of more ve
While some users may find that the smaller API of `serde_test` is sufficient for their use-case, others will find that the flexibility of this crate makes testing more complicated `Serailize` and `Deserialize` implementations easier. Among other things, this crate's API provides these advantages:

- Direct access to the [`Serializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Serializer.html) and [`Deserializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Deserializer.html), allowing use of all parts of the `serde` `Serializer` and `Deserializer` APIs, such as deserializing types that implement [`DeserializeSeed`](https://docs.rs/serde/latest/serde/de/trait.DeserializeSeed.html).
- Customization of [`Serializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Serializer.html)s and [`Deserializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Deserializer.html)s, allowing configuration of things like human-readability or whether the `Deserializer` should interpret [`Tokens`](https://docs.rs/serde_assert/latest/serde_assert/struct.Tokens.html) as self-describing.
- Customization of [`Serializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Serializer.html)s and [`Deserializer`](https://docs.rs/serde_assert/latest/serde_assert/struct.Deserializer.html)s, allowing configuration of things like human-readability, whether the `Deserializer` should interpret [`Tokens`](https://docs.rs/serde_assert/latest/serde_assert/struct.Tokens.html) as self-describing, and zero-copy deserialization.
- Sophisticated comparison of serialized [`Tokens`](https://docs.rs/serde_assert/latest/serde_assert/struct.Tokens.html), including allowing testing of types whose serialized form can include items in arbitrary order, such as when serializing a [`HashSet`](https://docs.rs/hashbrown/latest/hashbrown/struct.HashSet.html).

## Minimum Supported Rust Version
Expand Down
Loading

0 comments on commit 08c2a25

Please sign in to comment.