⚠️ indicates a breaking change.
[Unreleased]
Added
Changed
Removed
[0.12.0] - 2025-05-13
Added
- Proper value validation.
Params::get_fromstr()
takes the place ofget_param()
, and is more explicit about what it does -- call theFromStr
trait to parse the parameter's value.- Added the ability to the codec
Decoder
to send incomingBytes
through a channel. This can be activated usingCodec::expect_bytes_channel()
. Error::Param
andParamError
are used to signal errors when getting/setting parameters from/toParams
.Params::add()
was added as a no-conversion means to addString
s to aParams
.- The
bool
parser inParams
now also recognizeson
andoff
. Params::encode_anon_list()
/Params::decode_anon_list()
can be used to encode aVec<T>
in aParams
buffer.Params::encode_named_list()
/Params_decode_named_list()
serve the same role as theiranon
counter-parts, but thenamed
variant supports using a namespace, allowing multiple lists in the sameParams
buffer.- Support for encoding/decoding binary data into
Params
values. Requires the featurebin
. - Support for encoding/decoding types into/from Params values using the
bincode
crate. Requires the featurebincode
.
Changed
- ⚠️ Major redesign
Telegram
no longer reimplement methods as thin wrappers aroundParams
. Instead it implementsDeref
andDerefMut
so theParams
' functionality can be accessed through theTelegram
.
- Removed the
types
module; moved all its submodules to the top module. - Added missing error-handling in various places.
- ⚠️ Methods that previously could return
Error::KeyNotFound
now wrap their return value inOption
instead. - ⚠️ Renamed
Params::have()
toParams::contains()
. - ⚠️
From<HashMap<String, String>> for Paramas
changed toTryFrom
, and now performs key/value validation.
Removed
- ⚠️ All the
_def
methods have been removed. Use iterator adapters instead. - ⚠️ Removed the
codec/utils
module, including itsexpect_telegram()
function. - ⚠️
Error::BadState
was removed. It was unused. - ⚠️
Error::KeyNotFound
was removed. Instead, methods useOption
to signal that a key was not found.
[0.11.0] - 2024-09-22
Changed
- ⚠️
Error::IO
carries with itstd::io::Error
rather than a string representation of the error.
Removed
- ⚠️
Error
no longer implementsPartialEq
. - ⚠️
Telegram::clear()
was removed because there's no "default" topic. - Remove
From<Params>
forTelegram
(since it needs a topic now).
[0.10.1] - 2024-08-06
Added
- Module
codec::utils
added for collectingFrame
'd stream helpers. codec::utils::expect_telegram()
can be used to receiveTelegram
s with simple validation.- Add
TryFrom<(&str, Params)>
implementation forTelegram
.
[0.10.0] - 2024-02-23
Changed
- Dependency maintenance.
- ⚠️ Changed
expect_chunks()
to accept length asu64
rather thanusize
to support blobs on 32-bit platforms. - ⚠️ Make
skip()
take inu64
rather thanusize
to be able to skip very large blobs. - ⚠️ Use
Bytes
rather thanBytesMut
for chunk buffer. - ⚠️ The decoder will wrap any errors relating to parsing incoming data in
Error::Protocol()
to signal that the incoming protocol fomrat was invalid. - ⚠️ Make
expect_chunks()
fallible and check for zero-length.
Removed
- ⚠️ Removed three codec states:
BytesMut
has turned out not to be particularly useful.File
was always a bad idea.Writer
can have valid use-cases, but risk being misused as a substitute forFile
.
Use Bytes
instead of BytesMut
. Use Chunks
instead of File
or
Writer
, and let the application write the chunks as appropriate.