diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f620fe1..44749b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,12 @@ ## v0.12.0 (unreleased) -- Client: Add new Modbus `Client` API. -- Client: Add `Result` type alias. - -```rust -pub type Result = Result, std::io::Error> -``` - -- Example: Update all examples with new `Client` API. +- Client: Support handling of _Modbus_ exceptions by using nested `Result`s. ### Breaking Changes -- Client: All the functions signatures in `Client`, `Reader` and `Writer` traits - have changed the return type. +- Client: All methods in the `Client`, `Reader` and `Writer` traits now return + nested `Result` values that both need to be handled explicitly. ```diff async fn read_coils(&mut self, _: Address, _: Quantity) @@ -25,6 +18,13 @@ pub type Result = Result, std::io::Error> + -> Result, Exception>, std::io::Error>; ``` +The type alias `tokio_modbus::Result` facilitates referencing the new return +types. + +```rust +pub type Result = Result, std::io::Error> +``` + ## v0.11.0 (2024-01-28) - Server: Remove `Sync` and `Unpin` trait bounds from `Service::call()` future