#[non_exhaustive]pub enum ValueType {
Show 18 variants
None,
String,
List,
Set,
ZSet,
Hash,
Stream,
VectorSet,
JSON,
BloomFilterRedis,
CuckooFilter,
CountMin,
TDigest,
TopK,
TimeSeries,
Trie,
BloomFilterValKey,
Unknown(String),
}Expand description
Possible types of value held in Redis: Redis Docs
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Key does not have a value
String
Generally returned by anything that returns a single element. Redis Docs
List
A list of String values. Redis Docs
Set
A set of unique String values. Redis Docs
ZSet
A sorted set of String values. Redis Docs
Hash
A collection of field-value pairs. Redis Docs
Stream
A Redis Stream. Redis Docs
VectorSet
A vector set. Redis Docs
JSON
A RedisJSON value. Redis Docs
BloomFilterRedis
A Bloom filter from Redis’ module. Redis Docs
CuckooFilter
A Cuckoo filter. Redis Docs
CountMin
A Count-min. Redis Docs
TDigest
A t-Digest. Redis Docs
TopK
A Top-K. Redis Docs
TimeSeries
A time series. Redis Docs
Trie
A Trie. Redis Docs
BloomFilterValKey
A Bloom filter from Valkey’s module. ValKey Docs
Unknown(String)
Any other value type not explicitly defined in Redis Docs
Trait Implementations§
Source§impl FromRedisValue for ValueType
impl FromRedisValue for ValueType
Source§fn from_redis_value_ref(v: &Value) -> Result<Self, ParsingError>
fn from_redis_value_ref(v: &Value) -> Result<Self, ParsingError>
Given a redis
Value this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated.Source§fn from_redis_value(v: Value) -> Result<Self, ParsingError>
fn from_redis_value(v: Value) -> Result<Self, ParsingError>
Given a redis
Value this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated.Source§fn from_redis_value_refs(items: &[Value]) -> Result<Vec<Self>, ParsingError>
fn from_redis_value_refs(items: &[Value]) -> Result<Vec<Self>, ParsingError>
Similar to
from_redis_value_ref but constructs a vector of objects
from another vector of values. This primarily exists internally
to customize the behavior for vectors of tuples.Source§fn from_redis_values(items: Vec<Value>) -> Result<Vec<Self>, ParsingError>
fn from_redis_values(items: Vec<Value>) -> Result<Vec<Self>, ParsingError>
The same as
from_redis_value_refs, but takes a Vec<Value> instead
of a &[Value].Source§fn from_each_redis_values(items: Vec<Value>) -> Vec<Result<Self, ParsingError>>
fn from_each_redis_values(items: Vec<Value>) -> Vec<Result<Self, ParsingError>>
The same as
from_redis_values, but returns a result for each
conversion to make handling them case-by-case possible.Source§fn from_byte_slice(_vec: &[u8]) -> Option<Vec<Self>>
fn from_byte_slice(_vec: &[u8]) -> Option<Vec<Self>>
Convert bytes to a single element vector.
Source§fn from_byte_vec(_vec: Vec<u8>) -> Result<Vec<Self>, ParsingError>
fn from_byte_vec(_vec: Vec<u8>) -> Result<Vec<Self>, ParsingError>
Convert bytes to a single element vector.
impl StructuralPartialEq for ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnsafeUnpin for ValueType
impl UnwindSafe for ValueType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more