rust_mqtt/client/info/connect.rs
1use crate::types::MqttString;
2
3/// Information taken from a connection handshake the client does not have to store
4/// for correct operational behaviour and does not store for optimization purposes.
5///
6/// Does not include the reason code as it is always [`crate::types::ReasonCode::Success`] (0x00)
7/// if this is returned.
8#[derive(Debug, Clone)]
9#[cfg_attr(feature = "defmt", derive(defmt::Format))]
10pub struct Info<'i> {
11 /// If set to true, a previous session is continued by the server for this connection.
12 pub session_present: bool,
13
14 /// The server can assign a different client identifier than the one in the CONNECT packet
15 /// or must assign a client identifier if none was included in the CONNECT packet.
16 /// This is the final client identifier value used for this session.
17 pub client_identifier: MqttString<'i>,
18
19 /// Response information used to create response topics.
20 pub response_information: Option<MqttString<'i>>,
21
22 /// Another server which can be used.
23 pub server_reference: Option<MqttString<'i>>,
24}