Factory+ Rust Service Client
Overview
This library provides a client for interacting with Factory+ services in Rust applications.
Installation and Usage
- Add this crate to your
cargo.toml:
- Import the
ServiceClient:
use ServiceClient;
- Interact with it as an entry point.
Example
This example creates a ServiceClient, subscribes to all messages on a Sparkplug device topic, and prints the received
data. Here we depend on the tokio async runtime. Note that we can iterate on the
receiver to pull the data when it's available, and the Sparkplug payloads are decoded for us.
use MqttProtocol;
use ServiceClient;
async
Limitations
There is no synchronous implementation of this service client.