⚠️ 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 theFromStrtrait to parse the parameter's value.- Added the ability to the codec
Decoderto send incomingBytesthrough a channel. This can be activated usingCodec::expect_bytes_channel(). Error::ParamandParamErrorare used to signal errors when getting/setting parameters from/toParams.Params::add()was added as a no-conversion means to addStrings to aParams.- The
boolparser inParamsnow also recognizesonandoff. Params::encode_anon_list()/Params::decode_anon_list()can be used to encode aVec<T>in aParamsbuffer.Params::encode_named_list()/Params_decode_named_list()serve the same role as theiranoncounter-parts, but thenamedvariant supports using a namespace, allowing multiple lists in the sameParamsbuffer.- Support for encoding/decoding binary data into
Paramsvalues. Requires the featurebin. - Support for encoding/decoding types into/from Params values using the
bincodecrate. Requires the featurebincode.
Changed
- ⚠️ Major redesign
Telegramno longer reimplement methods as thin wrappers aroundParams. Instead it implementsDerefandDerefMutso theParams' functionality can be accessed through theTelegram.
- Removed the
typesmodule; moved all its submodules to the top module. - Added missing error-handling in various places.
- ⚠️ Methods that previously could return
Error::KeyNotFoundnow wrap their return value inOptioninstead. - ⚠️ Renamed
Params::have()toParams::contains(). - ⚠️
From<HashMap<String, String>> for Paramaschanged toTryFrom, and now performs key/value validation.
Removed
- ⚠️ All the
_defmethods have been removed. Use iterator adapters instead. - ⚠️ Removed the
codec/utilsmodule, including itsexpect_telegram()function. - ⚠️
Error::BadStatewas removed. It was unused. - ⚠️
Error::KeyNotFoundwas removed. Instead, methods useOptionto signal that a key was not found.
[0.11.0] - 2024-09-22
Changed
- ⚠️
Error::IOcarries with itstd::io::Errorrather than a string representation of the error.
Removed
- ⚠️
Errorno 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::utilsadded for collectingFrame'd stream helpers. codec::utils::expect_telegram()can be used to receiveTelegrams with simple validation.- Add
TryFrom<(&str, Params)>implementation forTelegram.
[0.10.0] - 2024-02-23
Changed
- Dependency maintenance.
- ⚠️ Changed
expect_chunks()to accept length asu64rather thanusizeto support blobs on 32-bit platforms. - ⚠️ Make
skip()take inu64rather thanusizeto be able to skip very large blobs. - ⚠️ Use
Bytesrather thanBytesMutfor 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:
BytesMuthas turned out not to be particularly useful.Filewas always a bad idea.Writercan 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.