pub struct Sort<'a> {
pub by: Option<&'a [u8]>,
pub get: &'a [&'a [u8]],
pub limit: Option<(i64, i64)>,
pub desc: bool,
pub alpha: bool,
pub store: bool,
}Expand description
What SORT was asked to do, everything except the key and the destination.
Borrowed from the caller’s arguments rather than owned, because on the wire path every field of this is a slice of the command that is already in memory and copying them would be copying the command.
Fields§
§by: Option<&'a [u8]>The BY pattern, if there was one.
get: &'a [&'a [u8]]The GET patterns, in the order they were given, # included.
limit: Option<(i64, i64)>LIMIT offset count, if there was one.
Both halves are signed because both halves are on the wire as integers and Redis takes them without complaint. A negative offset is clamped to the front and a negative count means everything from the offset on.
desc: boolDESC, which reverses whatever order the rest of this produced.
alpha: boolALPHA, which compares bytes where the default compares numbers.
store: boolWhether the answer is going into a key rather than back to the caller.
Set by Keyspace::sort_store and not by the caller. It is in here
rather than a separate argument because it changes the ordering and not
just what happens to the result. See the module doc.