[−][src]Struct sage_mqtt::ConnAck
The Connack
message is sent from the server to the client to acknowledge
the connection request. This can be the direct response to a Connect
message or the closing exchange of Auth
packets.
Fields
session_present: bool
If the session_present
is true, the connection is accepted using a
previously and unexpired session.
reason_code: ReasonCode
The reason code for the connect acknowledgement.
Success
UnspecifiedError
MalformedPacket
ProtocolError
ImplementationSpecificError
UnsupportedProtocolVersion
ClientIdentifierNotValid
BadUserNameOrPassword
NotAuthorized
ServerUnavailable
ServerBusy
session_expiry_interval: Option<u32>
The session expiry interval the server will use. If absent the server
simply accepted the value sent by the server in the Connect
packet.
receive_maximum: u16
The maximum number of AtLeastOnce
and ExactlyOnce
qualities of
service the server will concurrently treat for the client.
maximum_qos: QoS
The maximum quality of service the server is willing to accept.
This value cannot be ExactlyOnce
. Any server receiving a message
with QoS higher than it's maximum is expected to close the connection.
retain_available: bool
true
if the server supports retaining messages. false
otherwise.
Sending retain messages (including Last Will) to a server which does not
support this feature will resulting in a disconnection.
maximum_packet_size: Option<u32>
The maximum size in bytes the server is willing to accept. This value
cannot be 0
. If absent there is not maximum packet size.
assigned_client_id: Option<ClientID>
If the Connect
packet did not have any client id, the server will
send one using assigned_client_id
.
topic_alias_maximum: u16
The maximum value the server will accept as topic alias. If 0
the
server does not accept topic aliases.
reason_string: String
A human readable reason string used to describe the connack. This field is optional.
user_properties: Vec<(String, String)>
General purpose user properties.
wildcard_subscription_available: bool
If true
, the server accepts subscribing to topics using wildcards.
subscription_identifiers_available: bool
If true
, the server accepts subscription identifiers.
If true
, the server accepts shared subscriptions.
keep_alive: Option<u16>
The server can override the keep alive value requested by the client
upon Connect
.
response_information: String
If the client asked for response information, the server may send it
in response_information
.
The response information can be used by the client as an hint to
generate reponse topic when making Request/Reponse messages.
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.
authentication: Option<Authentication>
Upon using enhanced connexion, ending the Auth
exchange will result in
a ConnAck
packet which may contain Authentication
data.
Trait Implementations
impl Clone for ConnAck
[src]
impl Debug for ConnAck
[src]
impl Default for ConnAck
[src]
impl PartialEq<ConnAck> for ConnAck
[src]
impl StructuralPartialEq for ConnAck
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnAck
impl Send for ConnAck
impl Sync for ConnAck
impl Unpin for ConnAck
impl UnwindSafe for ConnAck
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,