Skip to main content

rust_mqtt/config/
shared.rs

1use crate::config::{KeepAlive, SessionExpiryInterval};
2
3/// Negotiated configuration valid for the duration of a connection.
4#[derive(Debug, Clone, Copy, Default)]
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
6pub struct Config {
7    /// The negotiated [`KeepAlive`] interval in seconds allowed to expire between sending two packets without the connection being closed.
8    pub keep_alive: KeepAlive,
9
10    /// The negotiated [`SessionExpiryInterval`] after the connection has been closed.
11    pub session_expiry_interval: SessionExpiryInterval,
12}