Function ocypod::redis_utils::vec_from_redis_pipe
source · [−]pub async fn vec_from_redis_pipe<C: ConnectionLike, T: FromRedisValue>(
conn: &mut C,
pipe: &Pipeline
) -> RedisResult<Vec<T>>
Expand description
Helper function for getting nested data structures from Redis pipelines.
Used for e.g. querying for vectors of tuples from: pipe.hget(key1, [x, y, z]) .hget(key2, [x, y, z]) .hget(key3, [x, y, z])
let (a, b, c): Vec<(x_type, y_type, z_type)> = vec_from_redis_pipe(pipe, conn)?;