Releases: quartiq/miniconf
Releases · quartiq/miniconf
Miniconf v0.10.0
Changed
- [breaking] Python lib signatures have changed (Miniconf.create(), discover())
- Python lib discovery timeout has been optimized to work well for both slow
connections (high RTT) and fast ones - [breaking] The MQTT client does not own the miniconf settings struct anymore.
- [breaking]
handled_update()has been removed from the MQTT client in favor of validator/getter/setter callbacks. - [breaking] The MQTT client has been split into its own
miniconf_mqttcrate. - [breaking] The attribute syntax has changed from
#[tree(depth(1))]to#[tree(depth=1)]. - [breaking] The default depth is
0, also in the case where a#[tree()]withoutdepthhas been specified. - [breaking] The
traverse_by_keycallback also receives the number of indices at the given level. - The trait methods are now generic over
Keysand not overIterator<Item: Key>.
A blanket implementation has been provided. JsonCoreSlash::{set,get}_json_by_indices()removed in favor of{get,set}_json_by_key().- [breaking]
Error::PostDeserializationrenamed toError::Finalization. - [breaking]
json-coreremoved from default features. - [breaking] Bumped MSRV to 1.70.0
Added
- Python MQTT lib: Support for clearing a retained setting
- Python MQTT CLI: get() support
TreeKey::iter_indices()anditer_indices_unchecked()- Derive macros: Support for fallible getter/setter/validation callbacks
- Support for bit-packed keys
Packedanditer_packed()/iter_packed_unchecked() - A
postcardfeature andPostcardtrait and blanket implementation TreeKey::len()- The
typderive macro attribute
Full Changelog: v0.9.0...v0.10.0
miniconf-v0.10.1
Full Changelog: v0.10.0...miniconf-v0.10.1
Miniconf v0.9.0
Changed
- The
Miniconftrait has been split intoTreeKeyfor the keys/path/indices and traversal,
theTreeSerializefor serialization, andTreeDeserializefor deserialization.
The derive macros have been split accordingly. A shorthand#[derive(Tree)]macro has been
added to derive all three traits. The struct field attribute controlling
recursion depth has been renamed to#[tree(depth(Y))]. - [mqtt] The
Listcommand of theMqttClientnow has a maximum correlation data length of 32 bytes - [mqtt] The
MqttClientAPI has changed to support new Minimq versions - [mqtt] The
Getcommand now only generates a single message in response to the provided
ResponseTopic instead of a response type (with success) and a message on the original topic. - [mqtt] Handler function singatures now require
Displayinstead ofAsRef<str>types
Added
- Deserializing with borrowed data is now supported.
- [derive] Added
#[tree(skip)]macro attribute to allow skipping entries.
Miniconf v0.8.0
Added
- Traversal by names or indices has been added through
Miniconf::traverse_by_key(). - The
Miniconfderive macro supports (unnamed) tuple structs.
Removed
- [breaking] The
ArrayandOptionnewtypes have been removed. Instead in structs
the desiredMiniconf<N>recursion depth for a field is indicated by an attribute
#[miniconf(defer(N))]whereNis ausizeliteral. The depth is communicated
via the trait. For[T;N]andOptionthe depth up to8has been implemented.
Forstructsit is arbitrary.
Changed
- [breaking] The
Miniconftrait is now generic over theDeserializer/Serializer. It
doesn't enforceserde-json-coreoru8buffers or/as the path hierarchy
separator anymore. - [breaking]
Miniconf::iter_paths()takes the path hierarchy separator and passes
it on toMiniconf::path()andMetadata::separator(). - [breaking] The
Miniconftrait has been stripped of the provided functions that depended
on theserde-backend and path hierarchy separator. Those have been
moved into theJsonCoreSlashtrait that has been implemented for allMiniconf
to provide the previously existing functionality. - [breaking]
set()andget()have been renamed toset_json()andget_json()
respectively to avoid overlap. - [breaking] Paths now start with the path separator (unless they are empty).
This affects theMiniconfderive macro and theMiniconfimplementation pairs
forOption/Array.
Downstram crates should ensure non-empty paths start with the separator and
expectnext_pathpaths to start with the separator or be empty. - The main serialization/deserialization methods are now
Miniconf::{set,get}_by_key()
They are generic over the key iteratorIterator<Item: miniconf::Key>. - The only required change for most direct downstream users the
Miniconftrait
to adapt to the above is to make sure theJsonCoreSlashtrait is in scope
(use miniconf::JsonCoreSlash) and to rename{set,get}() -> {set,get}_json().
TheMqttClienthas seen no externally visible changes. - [breaking]
iter_paths()anditer_paths_unchecked()now don't need the state
size anymore as it's computed exactly at compile time. - [breaking]
iter_paths/PathIteris now generic over the type
to write the path into. Downstream crates should replaceiter_paths::<L, TS>()with
e.g.iter_paths::<heapless::String<TS>>(). - [breaking] Re-exports of
heaplessandserde-json-corehave been removed as they
are not needed to work with the public API and would be a semver hazard. - [breaking] Metadata is now computed by default without taking into account
path separators. These can be included usingMetadata::separator().
Miniconf v0.7.1
What's Changed
Full Changelog: v0.7.0...v0.7.1
Miniconf v0.7.0
What's Changed
- option: actually return PathAbsent by @jordens in #128
- rj/complex example by @jordens in #129
- Adding mechanism to query path structure and active values by @ryan-summers in #124
- Updating response codes to use user properties by @ryan-summers in #133
- rj/itoa by @jordens in #130
- mqtt client: escalate more some errors by @jordens in #135
- Fixing user property ordering by @ryan-summers in #138
- AsRef, AsMut, IntoIterator by @jordens in #141
- Bumping client, releasing Miniconf by @ryan-summers in #145
Full Changelog: v0.6.3...v0.7.0
v0.6.3
What's Changed
- Replacing
developwithmainby @ryan-summers in #119 - add from/into docs by @jordens in #121
- repr(transparent) for option and array by @jordens in #122
- Preparing for a 0.6.3 release by @ryan-summers in #127
Full Changelog: v0.6.2...v0.6.3
v0.6.2
v0.6.1
Miniconf v0.6.0
What's Changed
- py: remove whitespace on dump by @jordens in #92
- Feature/unique discovery by @ryan-summers in #98
- Support heapless primitives by @nkrackow in #96
- Cleaning up python client by @ryan-summers in #101
- Feature/trait rework by @ryan-summers in #100
- refactorings/renamings by @jordens in #102
- rework (make get/set_path generic Peekable, associated fns for metadata and next_path) by @jordens in #105
- symmetric error by @jordens in #108
- next_path() errors and path count by @jordens in #109
- Feature/minimq update by @ryan-summers in #95
- Updating client to use at-least-once responses by @ryan-summers in #111
- use slice::fill() by @jordens in #113
- bump serde-json-core by @jordens in #112
Full Changelog: v0.5.0...v0.6.0