Releases: bluk/bt_bencode
Releases · bluk/bt_bencode
v0.8.2
v0.8.1
v0.8.0
Updated
- Breaking change: Modify
Valuevariants to useByteStringinstead of
serde_bytes::ByteBuffor byte string values. Removed theserde_bytes
dependency.
Added
- Add
ByteStringtype as a specialized type for serialization and
deserialization of bencoded strings.
v0.7.0
Added
- Add
Deserializer::byte_offset()to return the byte offset in the underlying source. It may be useful if there is trailing data. - 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 guaranteed due to dependencies being free to bump their version.
Updated
-
In general, fewer allocations are made when parsing values.
-
Breaking change: Refactored the
Readtrait to allow borrowing against the original data.#[derive(Deserialize)] struct Info<'a> { name: Option<&'a str>, pieces: &'a [u8], }
should work now when using
from_slice. -
Breaking change: Refactored the
Errortype.The
Error::byte_offset()method can help hint where the error occurred at (usually only helpful for deserialization).Refactored to use
Boxto reduce the size of the return types. Rationale is
influenced by Serde JSON issues/discussions where an allocation for an exceptional code path is acceptable.