Struct actix_mqtt_client::MqttClient[][src]

pub struct MqttClient { /* fields omitted */ }
Expand description

The client for connecting to the MQTT server

Implementations

Create a new MQTT client

Returns the name of the client

Perform the connect operation to the remote MQTT server

Note: This function can only be called once for each client, calling it the second time will return an error Note: The successful return of this function DOES NOT mean that the MQTT connection is successful, if anything wrong happens the error actor will receive an error Note: Please use is_connected() to check whether the MQTT connection is successful or not

Check whether the client has connected to the server successfully

Subscribe to the server with a topic and QoS

Unsubscribe from the server

Publish a message

Disconnect from the server

Check if the client has been disconnected from the server, useful to check whether disconnection is completed

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.