Struct sage_mqtt::Disconnect [−][src]
pub struct Disconnect {
pub reason_code: ReasonCode,
pub session_expiry_interval: Option<u32>,
pub reason_string: Option<String>,
pub user_properties: Vec<(String, String)>,
pub reference: Option<String>,
}
Expand description
A Disconnect
packet can be sent by the client or the server to gracefully
disconnect.
Fields
reason_code: ReasonCode
The reason code code the Disconnect
notice.can be any of:
- Client or Server
+
AdministrativeAction
+ImplementationSpecificError
+MalformedPacket
+MessageRateTooHigh
+NormalDisconnection
+PacketTooLarge
+PayloadFormatInvalid
+ProtocolError
+QuotaExceeded
+ReceiveMaximumExceeded
+TopicAliasInvalid
+TopicNameInvalid
+UnspecifiedError
- Server Only
+
ConnectionRateExceeded
+KeepAliveTimeout
+MaximumConnectTime
+NotAuthorized
+QoSNotSupported
+RetainNotSupported
+ServerBusy
+ServerMoved
+ServerShuttingDown
+SessionTakenOver
+SharedSubscriptionsNotSupported
+SubscriptionIdentifiersNotSupported
+TopicFilterInvalid
+UseAnotherServer
+WildcardSubscriptionsNotSupported
- Client Only
+
DisconnectWithWillMessage
session_expiry_interval: Option<u32>
session_expiry_interval
can be used to override the session expiry
period formerly set upon connection. If not present, the session expiry
interval value set using Connect
or Connack
is still in use.
reason_string: Option<String>
An optional descriptin of the reason for deconnecting.
user_properties: Vec<(String, String)>
General purpose user properties.
reference: Option<String>
If the reason code is ServerMoved
or UserAnotherServer
, the
reference
field is used to inform the client about why new server to
connect to instead.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Disconnect
impl Send for Disconnect
impl Sync for Disconnect
impl Unpin for Disconnect
impl UnwindSafe for Disconnect
Blanket Implementations
Mutably borrows from an owned value. Read more