Skip to main content

srad_client/
lib.rs

1//! Part of [srad](https://crates.io/crates/srad), a general purpose [Sparkplug](https://sparkplug.eclipse.org/) development library.
2//!
3//! This library defines traits and types used to implement Sparkplug clients.
4//!
5//! # Feature Flags
6//!
7//! - `channel-client`: Enables the channel based [EventLoop] and [Client] implementation. Disabled by default.
8//!
9
10mod traits;
11mod types;
12mod utils;
13
14pub use traits::{Client, DynClient, DynEventLoop, EventLoop};
15pub use types::*;
16pub use utils::topic_and_payload_to_event;
17
18/// A basic [EventLoop] and [Client] implementation based on channels
19///
20/// Useful for writing tests where it is not appropriate to be running a real MQTT client and broker setup
21#[cfg(any(feature = "channel-client", doc))]
22pub mod channel;