Struct paho_mqtt_redis::RedisPersistence
source · pub struct RedisPersistence { /* private fields */ }
Implementations§
source§impl RedisPersistence
impl RedisPersistence
pub fn new() -> RedisPersistence
Trait Implementations§
source§impl ClientPersistence for RedisPersistence
impl ClientPersistence for RedisPersistence
source§fn open(&mut self, client_id: &str, server_uri: &str) -> MqttResult<()>
fn open(&mut self, client_id: &str, server_uri: &str) -> MqttResult<()>
Open and initialize the persistent store.
@param client_id The unique client identifier.
@param server_uri The address of the server to which the client is
connected. Read more
source§fn close(&mut self) -> MqttResult<()>
fn close(&mut self) -> MqttResult<()>
Close the persistence store.
source§fn put(&mut self, key: &str, buffers: Vec<&[u8]>) -> MqttResult<()>
fn put(&mut self, key: &str, buffers: Vec<&[u8]>) -> MqttResult<()>
Put data into the persistence store.
@param key The key to the data.
@param The data to place into the store. Read more
source§fn get(&self, key: &str) -> MqttResult<Vec<u8>>
fn get(&self, key: &str) -> MqttResult<Vec<u8>>
Gets data from the persistence store.
@param key They key for the desired data. Read more
source§fn remove(&mut self, key: &str) -> MqttResult<()>
fn remove(&mut self, key: &str) -> MqttResult<()>
Removes data for the specified key.
@param key The key for the data to remove. Read more
source§fn keys(&self) -> MqttResult<Vec<String>>
fn keys(&self) -> MqttResult<Vec<String>>
Gets the keys that are currently in the persistence store
source§fn clear(&mut self) -> MqttResult<()>
fn clear(&mut self) -> MqttResult<()>
Clear the persistence store so that it no longer contains any data.