Skip to main content

Crate rumqttc

Crate rumqttc 

Source
Expand description

§rumqttc-next

crates.io page docs.rs page

rumqttc-next is the default MQTT 5 client crate in the rumqtt family. It is a facade over rumqttc-v5-next and re-exports that crate’s public API unchanged.

§Scope

  • Use rumqttc-next when you want the current MQTT 5 client under the traditional rumqttc API surface.
  • Use rumqttc-v5-next when you want the explicit protocol-scoped package name.
  • Use rumqttc-v4-next when you need MQTT 3.1.1 instead of MQTT 5.

§Installation

cargo add rumqttc-next

§Features

This crate forwards the MQTT 5 client features from rumqttc-v5-next, including:

  • use-rustls / use-rustls-no-provider / use-rustls-aws-lc / use-rustls-ring
  • use-native-tls
  • websocket
  • proxy
  • auth-scram
  • url

See the rumqttc-v5-next documentation for the full API and examples.

Modules§

mqttbytes
tokio_native_tls
Async TLS streams
tokio_rustls
Asynchronous TLS/SSL streams for Tokio using Rustls.

Structs§

AsyncClient
An asynchronous client, communicates with MQTT EventLoop.
AsyncClientBuilder
Builder for asynchronous MQTT clients.
Auth
Used to perform extended authentication exchange
AuthContext
Context supplied to MQTT 5 enhanced-authentication callbacks.
AuthNotice
Wait handle returned by tracked re-authentication APIs.
AuthProperties
Broker
Broker target used to construct MqttOptions.
Client
A synchronous client, communicates with MQTT EventLoop.
ClientBuilder
Builder for synchronous MQTT clients.
Codec
MQTT v4 codec
ConnAck
Acknowledgement to connect packet
ConnAckProperties
Connect
Connection packet initiated by the client
ConnectProperties
Connection
MQTT connection. Maintains all the necessary state
Disconnect
DisconnectProperties
EventLoop
Eventloop with all the state of a connection
Filter
Subscription filter
FixedHeader
Packet type from a byte
InvalidTopic
An error returned when a topic string fails validation against the MQTT specification.
Iter
Iterator which polls the EventLoop for connection progress
LastWill
LastWill that broker forwards on behalf of the client
LastWillProperties
MqttOptions
Options to configure the behaviour of MQTT connection
MqttOptionsBuilder
Builder for MqttOptions.
MqttState
State of the mqtt connection.
MqttStateBuilder
Builder for low-level MQTT 5 protocol state.
NetworkOptions
Provides a way to configure low level network connection configurations
PingReq
PingResp
Proxy
PubAck
Acknowledgement to QoS1 publish
PubAckProperties
PubComp
QoS2 Assured publish complete, in response to PUBREL packet
PubCompProperties
PubRec
Acknowledgement to QoS1 publish
PubRecProperties
PubRel
QoS2 Publish release, in response to PUBREC packet
PubRelProperties
Publish
Publish packet
PublishNotice
Wait handle returned by tracked publish APIs.
PublishProperties
RecvError
Error type returned by Connection::recv
SubAck
Acknowledgement to subscribe
SubAckProperties
Subscribe
Subscription packet
SubscribeNotice
Wait handle returned by tracked subscribe APIs.
SubscribeProperties
UnsubAck
Acknowledgement to unsubscribe
UnsubAckProperties
Unsubscribe
Unsubscribe packet
UnsubscribeNotice
Wait handle returned by tracked unsubscribe APIs.
UnsubscribeProperties
ValidatedTopic
A newtype wrapper that guarantees its inner String is a valid MQTT topic.

Enums§

AuthAction
Action returned by an Authenticator after an AUTH Continue packet.
AuthError
Errors returned by MQTT 5 enhanced-authentication callbacks.
AuthEvent
Structured authentication lifecycle event yielded by the event loop.
AuthExchangeKind
Identifies which MQTT 5 enhanced-authentication exchange is active.
AuthFailureReason
Structured reason emitted when an authentication exchange fails.
AuthNoticeError
AuthOutcome
Structured result of a completed MQTT 5 authentication exchange.
AuthReasonCode
Auth packet reason code
ClientError
Client Error
ConnectAuth
ConnectReturnCode
Return code in connack
ConnectionError
Critical errors during eventloop polling
DisconnectReasonCode
Error
Error during serialization and deserialization
Event
Events which can be yielded by the event loop
IncomingPacketSizeLimit
Controls how incoming packet size limits are enforced locally.
ManualAck
Prepared acknowledgement packet for manual acknowledgement mode.
NoticeFailureReason
OptionError
Outgoing
Current outgoing activity on the eventloop
Packet
PacketType
MQTT packet type
ProxyAuth
ProxyType
PubAckReason
Return code in puback
PubCompReason
Return code in PubComp
PubRecReason
Return code in PubRec
PubRelReason
Return code in PubRel
PublishNoticeError
PublishResult
PublishTopic
Topic argument accepted by publish APIs.
QoS
Quality of service
RecvTimeoutError
Error type returned by Connection::recv_timeout
Request
Requests by the client to mqtt event loop. Request are handled one by one.
RetainForwardRule
StateError
Errors during state handling
SubscribeNoticeError
SubscribeReasonCode
TlsConfigurationuse-rustls-no-provider or use-native-tls
TLS configuration method
TlsError
TopicAliasPolicy
Policy used for automatic MQTT 5 client-side topic alias assignment.
Transport
Transport methods. Defaults to TCP.
TryRecvError
Error type returned by Connection::try_recv
UnsubAckReason
UnsubscribeNoticeError

Traits§

Authenticator
MQTT 5 enhanced-authentication callback interface.

Functions§

check
Checks whether the stream contains a complete MQTT v5 packet within the configured size limit.
default_socket_connect
Default TCP socket connection logic used by the MQTT event loop.
has_wildcards
Checks if a topic or topic filter has wildcards
matches
Checks if topic matches a filter. topic and filter validation isn’t done here.
qos
Maps a number to QoS
valid_filter
Checks if the filter is valid
valid_topic
Checks if a topic is valid

Type Aliases§

Incoming