- Serialize and deserialize tuples and tuple structs.
- Allow deserialization from a borrowed
Value
. - Set supported Rust version to
1.36.0
. The MSRV is not guranteed due to dependencies being free to bump their version.
-
In general, fewer allocations are made when parsing values.
-
Breaking change: Refactored the
Read
trait to allow borrowing against the original data.#[derive(Deserialize)] struct Info<'a> { name: Option<&'a str>, pieces: &'a [u8], }
should work now. The data is borrowed from the original input.
0.6.1 - 2022-03-31
- Fix wrong error returned when parsing an invalid list.
- Add documentation to more items
- Add #[must_use] to more functions
0.6.0 - 2022-03-21
-
Allow serialization when no_std.
Adds
Write
trait and implementations.Thanks @bheesham.
0.5.1 - 2022-03-14
- Use
Bytes
forValues::Dict
index access instead of allocating aByteBuf
.
0.5.0 - 2022-03-09
- Update to
itoa
version1.0.1
.
0.4.0 - 2021-05-27
-
Allow deserialization of non-byte string values into raw byte buffers. In cases where a value is a non-byte string, a byte buffer can be used to capture the raw encoded value. For instance, assuming a dictionary with an
info
key which has a dictionary value:#[derive(Deserialize)] struct Metainfo { info: ByteBuf, }
could be used to capture the raw bytes of the encoded
info
dictionary value.For untrusted input, the value should be verified as having the correct type (e.g. a dictionary) instead of a byte string which contains the raw encoded value.
0.3.0 - 2020-10-10
Read
trait and helper implementationsIoRead
andSliceRead
are made public.- Add
Value
as_number()
. - Add multiple
From
implementations for all the common primitive signed and unsigned integers toNumber
.
0.2.0 - 2020-02-20
Value
type and related functions.
0.1.0 - 2020-02-20
Serializer
,Deserializer
, and related functions.