Skip to content

Commit

Permalink
doc(changelog): apply suggestion to changelog to improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
creberust committed Mar 12, 2024
1 parent 84d419e commit fcc1510
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@

## v0.12.0 (unreleased)

- Client: Add new Modbus `Client` API.
- Client: Add `Result` type alias.

```rust
pub type Result<T> = Result<Result<T, Exception>, 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)
- -> Result<Vec<Coil>, std::io::Error>;
+ -> Result<Result<Vec<Coil>, Exception>, std::io::Error>;
```

The type alias `tokio_modbus::Result<T>` facilitates referencing the new return
types.

```rust
pub type Result<T> = Result<Result<T, Exception>, std::io::Error>
```

## v0.11.0 (2024-01-28)

- Server: Remove `Sync` and `Unpin` trait bounds from `Service::call()` future
Expand Down

0 comments on commit fcc1510

Please sign in to comment.