fundamentum_edge_mcu_http_client/models/
provision_response.rs

1//! Provision response data structures.
2
3use serde::Deserialize;
4
5/// Provision Response Scheme
6#[derive(Deserialize)]
7#[cfg_attr(feature = "log", derive(defmt::Format))]
8#[cfg_attr(test, derive(Debug, PartialEq, Eq))]
9pub struct ProvisionResponse<'a, T> {
10    /// User provided configuration
11    pub configuration: Option<T>,
12    /// MQTT configuration
13    #[serde(borrow)]
14    pub mqtt: MqttBroker<'a>,
15}
16
17/// The Mqtt broker's configuration to access the Fundamentum MQTT API
18#[derive(Deserialize)]
19#[cfg_attr(feature = "log", derive(defmt::Format))]
20#[cfg_attr(test, derive(Debug, PartialEq, Eq))]
21pub struct MqttBroker<'a> {
22    /// MQTT Host
23    pub host: &'a str,
24    /// MQTT Port
25    pub port: u16,
26}