Skip to content

Commit a4c563a

Browse files
committed
docs: Update message_event docs
1 parent 14122b9 commit a4c563a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/src/03_5_3_mqtt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ client.subscribe(subscribe_topic, QoS::AtLeastOnce)
3939
## Handling Incoming Messages
4040

4141

42-
The `message_event` parameter in the handler closure is of type `Result<Event<EspMqttMessage>`.
43-
Since we're only interested in processing successfully received messages, we can make use of deep pattern matching into the closure:
42+
The `message_event` parameter in the handler closure is of type `EspMqttEvent`, which has a `payload()` method to access the `EventPayload`
43+
Since we're only interested in processing successfully received messages:
4444

4545
```rust
4646
{{#include ../../intro/mqtt/exercise/examples/solution_publ_rcv.rs:mqtt_client}}

0 commit comments

Comments
 (0)