#[non_exhaustive]pub enum ResponsePolicy {
OneSucceeded,
FirstSucceededNonEmptyOrAllEmpty,
AllSucceeded,
AggregateLogical(LogicalAggregateOp),
Aggregate(AggregateOp),
CombineArrays,
Special,
CombineMaps,
}cluster only.Expand description
Policy defining how to combine multiple responses into one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OneSucceeded
Wait for one request to succeed and return its results. Return error if all requests fail.
FirstSucceededNonEmptyOrAllEmpty
Returns the first succeeded non-empty result; if all results are empty, returns Nil; otherwise, returns the last received error.
AllSucceeded
Waits for all requests to succeed, and the returns one of the successes. Returns the error on the first received error.
AggregateLogical(LogicalAggregateOp)
Aggregate success results according to a logical bitwise operator. Return error on any failed request or on a response that doesn’t conform to 0 or 1.
Aggregate(AggregateOp)
Aggregate success results according to a numeric operator. Return error on any failed request or on a response that isn’t an integer.
CombineArrays
Aggregate array responses into a single array. Return error on any failed request or on a response that isn’t an array.
Special
Handling is not defined by the Redis standard. Will receive a special case
CombineMaps
Combines multiple map responses into a single map.
Trait Implementations§
Source§impl Clone for ResponsePolicy
impl Clone for ResponsePolicy
Source§fn clone(&self) -> ResponsePolicy
fn clone(&self) -> ResponsePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more