Expand description
This module contains the types that can be used with a Redis backend. Must be enabled by feature redis.
Redis Types
This crate provides a set of types that can be stored in Redis. The types are:
This crate implements the most common traits for the primitive types, so it is frictionless to use them in place. The methods of the types can be seen in the documentation of Generic. With this crate it is possible to create multiple services that shares the values via Redis. This is helpful if you want to create a distributed system and run multiple instances of the same service. Or you want to communicate between different services. All this kind of stuff can be done with this crate.
Upcoming Features
It will be possible to create happens-before relationships between store and load operations like atomic types.
Usage
use dtypes::redis::Di32 as i32;
let client = redis::Client::open("redis://localhost:6379").unwrap();
let mut i32 = i32::with_value(1, "test_add", client.clone());
i32 = i32 + i32::with_value(2, "test_add2", client.clone());
assert_eq!(i32, 3);More examples can be found on the doc pages of the types.
Structs
- The ClockOrdered type.
- The generic type is used to implement the common methods for all types.
- The guard struct for the Mutex. It is used to access the value and not for you to initialize it by your own.
- A list that is stored in Redis.
- A list that caches the values in memory It improves the performance, if you perform a lot of read only operations on the list.
- An iterator over the list.
- The RedisMutex struct.