pub enum ShardRequest {
Show 56 variants
Get {
key: String,
},
Set {
key: String,
value: Bytes,
expire: Option<Duration>,
nx: bool,
xx: bool,
},
Incr {
key: String,
},
Decr {
key: String,
},
IncrBy {
key: String,
delta: i64,
},
DecrBy {
key: String,
delta: i64,
},
IncrByFloat {
key: String,
delta: f64,
},
Append {
key: String,
value: Bytes,
},
Strlen {
key: String,
},
Keys {
pattern: String,
},
Rename {
key: String,
newkey: String,
},
Del {
key: String,
},
Unlink {
key: String,
},
Exists {
key: String,
},
Expire {
key: String,
seconds: u64,
},
Ttl {
key: String,
},
Persist {
key: String,
},
Pttl {
key: String,
},
Pexpire {
key: String,
milliseconds: u64,
},
LPush {
key: String,
values: Vec<Bytes>,
},
RPush {
key: String,
values: Vec<Bytes>,
},
LPop {
key: String,
},
RPop {
key: String,
},
LRange {
key: String,
start: i64,
stop: i64,
},
LLen {
key: String,
},
Type {
key: String,
},
ZAdd {
key: String,
members: Vec<(f64, String)>,
nx: bool,
xx: bool,
gt: bool,
lt: bool,
ch: bool,
},
ZRem {
key: String,
members: Vec<String>,
},
ZScore {
key: String,
member: String,
},
ZRank {
key: String,
member: String,
},
ZCard {
key: String,
},
ZRange {
key: String,
start: i64,
stop: i64,
with_scores: bool,
},
HSet {
key: String,
fields: Vec<(String, Bytes)>,
},
HGet {
key: String,
field: String,
},
HGetAll {
key: String,
},
HDel {
key: String,
fields: Vec<String>,
},
HExists {
key: String,
field: String,
},
HLen {
key: String,
},
HIncrBy {
key: String,
field: String,
delta: i64,
},
HKeys {
key: String,
},
HVals {
key: String,
},
HMGet {
key: String,
fields: Vec<String>,
},
SAdd {
key: String,
members: Vec<String>,
},
SRem {
key: String,
members: Vec<String>,
},
SMembers {
key: String,
},
SIsMember {
key: String,
member: String,
},
SCard {
key: String,
},
DbSize,
Stats,
Snapshot,
RewriteAof,
FlushDb,
FlushDbAsync,
Scan {
cursor: u64,
count: usize,
pattern: Option<String>,
},
CountKeysInSlot {
slot: u16,
},
GetKeysInSlot {
slot: u16,
count: usize,
},
}Expand description
A protocol-agnostic command sent to a shard.
Variants§
Get
Set
Fields
Incr
Decr
IncrBy
DecrBy
IncrByFloat
Append
Strlen
Keys
Returns all keys matching a glob pattern in this shard.
Rename
Renames a key within this shard.
Del
Unlink
Like DEL but defers value deallocation to the background drop thread.
Exists
Expire
Ttl
Persist
Pttl
Pexpire
LPush
RPush
LPop
RPop
LRange
LLen
Type
ZAdd
ZRem
ZScore
ZRank
ZCard
ZRange
HSet
HGet
HGetAll
HDel
HExists
HLen
HIncrBy
HKeys
HVals
HMGet
SAdd
SRem
SMembers
SIsMember
SCard
DbSize
Returns the key count for this shard.
Stats
Returns keyspace stats for this shard.
Snapshot
Triggers a snapshot write.
RewriteAof
Triggers an AOF rewrite (snapshot + truncate AOF).
FlushDb
Clears all keys from the keyspace.
FlushDbAsync
Clears all keys, deferring deallocation to the background drop thread.
Scan
Scans keys in the keyspace.
CountKeysInSlot
Counts keys in this shard that hash to the given cluster slot.
GetKeysInSlot
Returns up to count keys that hash to the given cluster slot.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ShardRequest
impl RefUnwindSafe for ShardRequest
impl Send for ShardRequest
impl Sync for ShardRequest
impl Unpin for ShardRequest
impl UnwindSafe for ShardRequest
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