[−][src]Struct paho_mqtt_redis::RedisPersistence
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
impl RedisPersistence
[src]
Trait Implementations
impl ClientPersistence for RedisPersistence
[src]
pub fn open(&mut self, client_id: &str, server_uri: &str) -> Result<()>
[src]
Opena the connection to the Redis client.
pub fn close(&mut self) -> Result<()>
[src]
Close the connection to the Redis client.
pub fn put(&mut self, key: &str, buffers: Vec<&[u8]>) -> Result<()>
[src]
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.
pub fn get(&mut self, key: &str) -> Result<Vec<u8>>
[src]
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.
pub fn remove(&mut self, key: &str) -> Result<()>
[src]
Remove the value with the specified key
from the store.
pub fn keys(&mut self) -> Result<Vec<String>>
[src]
Return a collection of all the keys in the store for this client.
pub fn clear(&mut self) -> Result<()>
[src]
Remove all the data for this client from the store.
pub fn contains_key(&mut self, key: &str) -> bool
[src]
Determines if the store for this client contains the specified key
.
impl Default for RedisPersistence
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RedisPersistence
[src]
impl Send for RedisPersistence
[src]
impl Sync for RedisPersistence
[src]
impl Unpin for RedisPersistence
[src]
impl !UnwindSafe for RedisPersistence
[src]
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,
pub 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, 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.
pub 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>,