Type Alias fred::types::XReadResponse
source · pub type XReadResponse<K1, I, K2, V> = HashMap<K1, Vec<XReadValue<I, K2, V>>>;
Available on crate feature
i-streams
only.Expand description
A generic helper type describing the top level response from XREAD
or XREADGROUP
.
See the xread documentation for more information.
The inner type declarations refer to the following:
- K1 - The type of the outer Redis key for the stream. Usually a
String
orRedisKey
. - I - The type of the ID for a stream record (“abc-123”). This is usually a
String
. - K2 - The type of key in the map associated with each stream record.
- V - The type of value in the map associated with each stream record.
To support heterogeneous values in the map describing each stream element it is recommended to declare the last
type as RedisValue
and convert as needed.
Aliased Type§
struct XReadResponse<K1, I, K2, V> { /* private fields */ }