pub struct RedisPersistence { /* private fields */ }
Expand description

The MQTT Redis persistence object. An instance of this stuct can be residtered with an MQTT client to hold messgaes in a Redis server until they are properly acknowledged by the remote MQTT server. An instance of this object maps to a single hash on a specific Redis server.

Implementations

Create a new persistence object to connect to a local Redis server.

Trait Implementations

Opena the connection to the Redis client.

Close the connection to the Redis client.

Store a persistent value to Redis. We get a vector of buffer references for the data to store, which we can concatenate into a single byte buffer to send to the server.

Get the data buffer for the requested key. Although the value sent to the server was a collection of buffers, we can return them as a single, concatenated buffer.

Remove the value with the specified key from the store.

Return a collection of all the keys in the store for this client.

Remove all the data for this client from the store.

Determines if the store for this client contains the specified key.

Create a new persistence object to connect to the Redis server on localhost.

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 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.