4820d0f6cd03b315f8c56f7b9bb3e4768fed97d7
The pieces are starting to come together. To control the browser via MQTT messages, the `MqttClient` dispatches messages via a `MessageHandler`, which parses them and makes the appropriate Marionette requests. The `MessageHandler` trait defines callback methods for each MQTT control operation, which currently is just `navigate`. The operation type is determined by the MQTT topic on which the message was received. Several new types are necessary to make this work. The `MessageHandler` trait and implementation are of course the core, reacting to incoming MQTT messages. In order for the handler to be able to *send* MQTT messages, though, it needs a reference to the Paho MQTT client. The `MqttPublisher` provides a convenient wrapper around the client, with specific methods for each type of message to send. Finally, there's the `MessageType` enumeration, which works in conjunction with the `TopicMatcher` to match topic names to message types using topic filter patterns.
Description
No description provided
Languages
Rust
99.9%
Shell
0.1%