From 36ee3f7851fe3c832304a2ba3cc5fc6e2209871e Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Mon, 23 Mar 2020 10:23:46 +0000 Subject: [PATCH] Release 0.3.0 * Added opt-in serde support to facilitate session and ack management (storing subscriptions and pids to disk or database). The actual encode()/decode() APIs are unchanged. * Upgrated bytes dependency to 0.5. This brings growable buffers and a nicer API, [amongst other things](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md). * Implemented `Default for Pid`, `From for Pid`, and `TryFrom for u16`. The `try_from()` method already existed but now comes from the `std::convert::TryFrom` trait. * `encode()` now takes anything that implements the `BufMut` trait, not just a `ByteMut` struct. For technical reasons, `decode()` still takes `BytesMut`. * Added option to opt-out of std library, allowing usage in `#[no_std]` projects, at the only cost of giving up the `Error` trait from std as well as `std::io` integration. * Fix off-by one error when adding to a Pid wraps over. * The minimum rust version is now 1.39. * Improved `Pid` docs. --- CHANGELOG.md | 2 +- Cargo.toml | 2 +- README.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 811f6cc..59f6fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.3 (unreleased) +# 0.3 (2020-03-23) ## API changes diff --git a/Cargo.toml b/Cargo.toml index f5b60e3..e1cd889 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mqttrs" -version = "0.2.0" +version = "0.3.0" authors = ["00imvj00 ", "Vincent de Phily ", "Mathias Koch "] diff --git a/README.md b/README.md index ecb2900..5333cef 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ packet). ## Usage -Add `mqttrs = "0.2"` and `bytes = "0.5"` to your `Cargo.toml`. +Add `mqttrs = "0.3"` and `bytes = "0.5"` to your `Cargo.toml`. ```rust use mqttrs::*; @@ -49,7 +49,7 @@ assert_eq!(Err(Error::InvalidHeader), decode(&mut garbage)); ## Optional [serde](https://serde.rs/) support. -Use `mqttrs = { version = "0.2", features = [ "derive" ] }` in your `Cargo.toml`. +Use `mqttrs = { version = "0.3", features = [ "derive" ] }` in your `Cargo.toml`. Enabling this features adds `#[derive(Deserialize, Serialize)]` to some `mqttrs` types. This simplifies storing those structs in a database or file, typically to implement session support (qos, @@ -60,7 +60,7 @@ functions. ## Optional `#[no_std]` support. -Use `mqttrs = { version = "0.2", default-features = false }` in your `Cargo.toml` to remove the +Use `mqttrs = { version = "0.3", default-features = false }` in your `Cargo.toml` to remove the default `std` feature. Disabling this feature comes with the cost of not implementing the `std::error::Error` trait,