pub enum Command {
Show 56 variants
Get(Vec<u8>),
Set {
key: Vec<u8>,
value: Bytes,
ex: Option<u64>,
px: Option<u64>,
},
Del(Vec<Vec<u8>>),
Exists(Vec<Vec<u8>>),
Incr(Vec<u8>),
IncrBy {
key: Vec<u8>,
delta: i64,
},
Decr(Vec<u8>),
DecrBy {
key: Vec<u8>,
delta: i64,
},
Expire {
key: Vec<u8>,
seconds: u64,
},
PExpire {
key: Vec<u8>,
milliseconds: u64,
},
Ttl(Vec<u8>),
PTtl(Vec<u8>),
Persist(Vec<u8>),
MGet(Vec<Vec<u8>>),
MSet(Vec<(Vec<u8>, Bytes)>),
Ping(Option<Bytes>),
Echo(Bytes),
Info(Option<String>),
Config {
action: String,
args: Vec<Bytes>,
},
Command {
subcommand: Option<String>,
args: Vec<Vec<u8>>,
},
Quit,
FlushDb,
Keys(String),
Scan {
cursor: Vec<u8>,
count: usize,
pattern: Option<String>,
},
JsonPatch {
key: Vec<u8>,
patch: Bytes,
},
Cas {
key: Vec<u8>,
expected: Bytes,
new_value: Bytes,
},
Auth(Vec<u8>),
LPush {
key: Vec<u8>,
values: Vec<Bytes>,
},
RPush {
key: Vec<u8>,
values: Vec<Bytes>,
},
LPop {
key: Vec<u8>,
count: Option<usize>,
},
RPop {
key: Vec<u8>,
count: Option<usize>,
},
LLen(Vec<u8>),
LRange {
key: Vec<u8>,
start: i64,
stop: i64,
},
LIndex {
key: Vec<u8>,
index: i64,
},
Subscribe(Vec<Vec<u8>>),
Unsubscribe(Option<Vec<Vec<u8>>>),
PSubscribe(Vec<Vec<u8>>),
PUnsubscribe(Option<Vec<Vec<u8>>>),
Publish {
channel: Vec<u8>,
message: Vec<u8>,
},
PubSub {
subcommand: String,
args: Vec<Vec<u8>>,
},
Client {
subcommand: String,
args: Vec<Vec<u8>>,
},
Multi,
Exec,
Discard,
Watch(Vec<Vec<u8>>),
Unwatch,
HSet {
key: Vec<u8>,
fields: Vec<(Vec<u8>, Bytes)>,
},
HGet {
key: Vec<u8>,
field: Vec<u8>,
},
HMGet {
key: Vec<u8>,
fields: Vec<Vec<u8>>,
},
HDel {
key: Vec<u8>,
fields: Vec<Vec<u8>>,
},
HExists {
key: Vec<u8>,
field: Vec<u8>,
},
HGetAll(Vec<u8>),
HLen(Vec<u8>),
HKeys(Vec<u8>),
HVals(Vec<u8>),
HIncrBy {
key: Vec<u8>,
field: Vec<u8>,
delta: i64,
},
}Variants§
Get(Vec<u8>)
Set
Del(Vec<Vec<u8>>)
Exists(Vec<Vec<u8>>)
Incr(Vec<u8>)
IncrBy
Decr(Vec<u8>)
DecrBy
Expire
PExpire
Ttl(Vec<u8>)
PTtl(Vec<u8>)
Persist(Vec<u8>)
MGet(Vec<Vec<u8>>)
MSet(Vec<(Vec<u8>, Bytes)>)
Ping(Option<Bytes>)
Echo(Bytes)
Info(Option<String>)
Config
Command
Quit
FlushDb
Keys(String)
Scan
JsonPatch
Cas
Auth(Vec<u8>)
LPush
RPush
LPop
RPop
LLen(Vec<u8>)
LRange
LIndex
Subscribe(Vec<Vec<u8>>)
Unsubscribe(Option<Vec<Vec<u8>>>)
PSubscribe(Vec<Vec<u8>>)
PUnsubscribe(Option<Vec<Vec<u8>>>)
Publish
PubSub
Client
Multi
Exec
Discard
Watch(Vec<Vec<u8>>)
Unwatch
HSet
HGet
HMGet
HDel
HExists
HGetAll(Vec<u8>)
HLen(Vec<u8>)
HKeys(Vec<u8>)
HVals(Vec<u8>)
HIncrBy
Implementations§
Source§impl Command
impl Command
Sourcepub fn is_pubsub_command(&self) -> bool
pub fn is_pubsub_command(&self) -> bool
Check if this is a pub/sub command
Sourcepub fn is_allowed_in_pubsub_mode(&self) -> bool
pub fn is_allowed_in_pubsub_mode(&self) -> bool
Check if this command is allowed in pub/sub mode
Sourcepub fn to_pubsub_op(self) -> Option<PubSubOp>
pub fn to_pubsub_op(self) -> Option<PubSubOp>
Convert to PubSubOp if this is a pub/sub command
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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