pub enum ShardRequest {
Show 45 variants
Get {
key: String,
},
Set {
key: String,
value: Bytes,
expire: Option<Duration>,
nx: bool,
xx: bool,
},
Incr {
key: String,
},
Decr {
key: String,
},
Del {
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,
Scan {
cursor: u64,
count: usize,
pattern: Option<String>,
},
}Expand description
A protocol-agnostic command sent to a shard.
Variants§
Get
Set
Fields
Incr
Decr
Del
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.
Scan
Scans keys in the keyspace.
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