Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 209 variants Get { key: Vec<u8>, }, Set { key: Vec<u8>, value: Vec<u8>, ex: Option<u64>, px: Option<u64>, nx: bool, xx: bool, }, GetSet { key: Vec<u8>, value: Vec<u8>, }, Append { key: Vec<u8>, value: Vec<u8>, }, Strlen { key: Vec<u8>, }, Incr { key: Vec<u8>, }, Decr { key: Vec<u8>, }, IncrBy { key: Vec<u8>, delta: i64, }, DecrBy { key: Vec<u8>, delta: i64, }, MGet { keys: Vec<Vec<u8>>, }, MSet { entries: Vec<(Vec<u8>, Vec<u8>)>, }, SetNx { key: Vec<u8>, value: Vec<u8>, }, IncrByFloat { key: Vec<u8>, delta: f64, }, GetRange { key: Vec<u8>, start: i64, end: i64, }, SetRange { key: Vec<u8>, offset: usize, value: Vec<u8>, }, GetDel { key: Vec<u8>, }, GetEx { key: Vec<u8>, ex: Option<u64>, px: Option<u64>, exat: Option<u64>, pxat: Option<u64>, persist: bool, }, MSetNx { entries: Vec<(Vec<u8>, Vec<u8>)>, }, Del { keys: Vec<Vec<u8>>, }, Exists { keys: Vec<Vec<u8>>, }, Expire { key: Vec<u8>, seconds: u64, }, PExpire { key: Vec<u8>, millis: u64, }, Persist { key: Vec<u8>, }, Ttl { key: Vec<u8>, }, PTtl { key: Vec<u8>, }, Type { key: Vec<u8>, }, Keys { pattern: String, }, Scan { cursor: u64, pattern: Option<String>, count: Option<usize>, }, ExpireAt { key: Vec<u8>, timestamp: u64, }, PExpireAt { key: Vec<u8>, timestamp_ms: u64, }, Rename { key: Vec<u8>, newkey: Vec<u8>, }, RenameNx { key: Vec<u8>, newkey: Vec<u8>, }, Unlink { keys: Vec<Vec<u8>>, }, Copy { source: Vec<u8>, destination: Vec<u8>, replace: bool, }, RandomKey, Touch { keys: Vec<Vec<u8>>, }, ObjectRefCount { key: Vec<u8>, }, ObjectIdleTime { key: Vec<u8>, }, ObjectHelp, DbSize, FlushDb, LPush { key: Vec<u8>, values: Vec<Vec<u8>>, }, RPush { key: Vec<u8>, values: Vec<Vec<u8>>, }, LPop { key: Vec<u8>, }, RPop { key: Vec<u8>, }, LLen { key: Vec<u8>, }, LRange { key: Vec<u8>, start: i64, stop: i64, }, LIndex { key: Vec<u8>, index: i64, }, LSet { key: Vec<u8>, index: i64, value: Vec<u8>, }, LInsert { key: Vec<u8>, before: bool, pivot: Vec<u8>, value: Vec<u8>, }, LRem { key: Vec<u8>, count: i64, value: Vec<u8>, }, LTrim { key: Vec<u8>, start: i64, stop: i64, }, LPos { key: Vec<u8>, value: Vec<u8>, rank: Option<i64>, count: Option<i64>, maxlen: Option<i64>, }, RPopLPush { source: Vec<u8>, destination: Vec<u8>, }, LMove { source: Vec<u8>, destination: Vec<u8>, from_left: bool, to_left: bool, }, HSet { key: Vec<u8>, fields: Vec<(Vec<u8>, Vec<u8>)>, }, HGet { key: Vec<u8>, field: Vec<u8>, }, HDel { key: Vec<u8>, fields: Vec<Vec<u8>>, }, HGetAll { key: Vec<u8>, }, HLen { key: Vec<u8>, }, HExists { key: Vec<u8>, field: Vec<u8>, }, HIncrBy { key: Vec<u8>, field: Vec<u8>, delta: i64, }, HMGet { key: Vec<u8>, fields: Vec<Vec<u8>>, }, HKeys { key: Vec<u8>, }, HVals { key: Vec<u8>, }, HSetNx { key: Vec<u8>, field: Vec<u8>, value: Vec<u8>, }, HIncrByFloat { key: Vec<u8>, field: Vec<u8>, delta: f64, }, HRandField { key: Vec<u8>, count: Option<i64>, withvalues: bool, }, HScan { key: Vec<u8>, cursor: u64, pattern: Option<String>, count: Option<usize>, }, SAdd { key: Vec<u8>, members: Vec<Vec<u8>>, }, SRem { key: Vec<u8>, members: Vec<Vec<u8>>, }, SMembers { key: Vec<u8>, }, SIsMember { key: Vec<u8>, member: Vec<u8>, }, SCard { key: Vec<u8>, }, SPop { key: Vec<u8>, count: Option<usize>, }, SRandMember { key: Vec<u8>, count: Option<i64>, }, SUnion { keys: Vec<Vec<u8>>, }, SUnionStore { destination: Vec<u8>, keys: Vec<Vec<u8>>, }, SInter { keys: Vec<Vec<u8>>, }, SInterStore { destination: Vec<u8>, keys: Vec<Vec<u8>>, }, SDiff { keys: Vec<Vec<u8>>, }, SDiffStore { destination: Vec<u8>, keys: Vec<Vec<u8>>, }, SInterCard { numkeys: usize, keys: Vec<Vec<u8>>, limit: Option<usize>, }, SMove { source: Vec<u8>, destination: Vec<u8>, member: Vec<u8>, }, SMisMember { key: Vec<u8>, members: Vec<Vec<u8>>, }, SScan { key: Vec<u8>, cursor: u64, pattern: Option<String>, count: Option<usize>, }, Ping { message: Option<Vec<u8>>, }, Echo { message: Vec<u8>, }, Info { section: Option<String>, }, BgSave, BgRewriteAof, FlushAll, CommandInfo { names: Vec<Vec<u8>>, }, Hello { version: Option<u8>, }, Auth { password: Vec<u8>, }, Dump, Multi, Exec, Discard, Watch { keys: Vec<Vec<u8>>, }, Unwatch, ConfigGet { pattern: String, }, ConfigSet { parameter: String, value: String, }, ConfigResetStat, ClientId, ClientGetName, ClientSetName { name: Vec<u8>, }, ClientList, ClientInfo, Time, Select { db: i64, }, Quit, Wait { numreplicas: i64, timeout: i64, }, CommandCount, CommandList, CommandHelp, CommandDocs { names: Vec<Vec<u8>>, }, DocCreate { collection: Vec<u8>, compression: Option<Vec<u8>>, }, DocDrop { collection: Vec<u8>, }, DocInfo { collection: Vec<u8>, }, DocDictInfo { collection: Vec<u8>, }, DocStorage { collection: Vec<u8>, }, DocSet { collection: Vec<u8>, doc_id: Vec<u8>, json: Vec<u8>, }, DocInsert { collection: Vec<u8>, json: Vec<u8>, }, DocMSet { collection: Vec<u8>, entries: Vec<(Vec<u8>, Vec<u8>)>, }, DocGet { collection: Vec<u8>, doc_id: Vec<u8>, fields: Vec<Vec<u8>>, }, DocMGet { collection: Vec<u8>, doc_ids: Vec<Vec<u8>>, }, DocUpdate { collection: Vec<u8>, doc_id: Vec<u8>, mutations: Vec<DocUpdateMutation>, }, DocDel { collection: Vec<u8>, doc_id: Vec<u8>, }, DocExists { collection: Vec<u8>, doc_id: Vec<u8>, }, DocCreateIndex { collection: Vec<u8>, field: Vec<u8>, index_type: Vec<u8>, }, DocDropIndex { collection: Vec<u8>, field: Vec<u8>, }, DocIndexes { collection: Vec<u8>, }, DocFind { collection: Vec<u8>, where_clause: Vec<u8>, fields: Vec<Vec<u8>>, limit: Option<usize>, offset: usize, order_by: Option<Vec<u8>>, order_desc: bool, }, DocCount { collection: Vec<u8>, where_clause: Vec<u8>, }, CdcPoll { cursor: u64, count: usize, }, CdcGroupCreate { key: Vec<u8>, group: String, start_seq: u64, }, CdcGroupRead { key: Vec<u8>, group: String, consumer: String, count: usize, }, CdcAck { key: Vec<u8>, group: String, seqs: Vec<u64>, }, CdcPending { key: Vec<u8>, group: String, }, VecSet { key: Vec<u8>, dimensions: usize, vector: Vec<f32>, }, VecQuery { key: Vec<u8>, k: usize, vector: Vec<f32>, }, VecDel { key: Vec<u8>, }, ZAdd { key: Vec<u8>, members: Vec<(f64, Vec<u8>)>, }, ZRem { key: Vec<u8>, members: Vec<Vec<u8>>, }, ZScore { key: Vec<u8>, member: Vec<u8>, }, ZRank { key: Vec<u8>, member: Vec<u8>, }, ZRevRank { key: Vec<u8>, member: Vec<u8>, }, ZCard { key: Vec<u8>, }, ZRange { key: Vec<u8>, start: i64, stop: i64, withscores: bool, }, ZRevRange { key: Vec<u8>, start: i64, stop: i64, withscores: bool, }, ZRangeByScore { key: Vec<u8>, min: f64, max: f64, withscores: bool, offset: Option<usize>, count: Option<usize>, }, ZIncrBy { key: Vec<u8>, delta: f64, member: Vec<u8>, }, ZCount { key: Vec<u8>, min: f64, max: f64, }, ZRevRangeByScore { key: Vec<u8>, max: f64, min: f64, withscores: bool, offset: Option<usize>, count: Option<usize>, }, ZPopMin { key: Vec<u8>, count: Option<usize>, }, ZPopMax { key: Vec<u8>, count: Option<usize>, }, ZRangeByLex { key: Vec<u8>, min: Vec<u8>, max: Vec<u8>, offset: Option<usize>, count: Option<usize>, }, ZRevRangeByLex { key: Vec<u8>, max: Vec<u8>, min: Vec<u8>, offset: Option<usize>, count: Option<usize>, }, ZLexCount { key: Vec<u8>, min: Vec<u8>, max: Vec<u8>, }, ZMScore { key: Vec<u8>, members: Vec<Vec<u8>>, }, ZRandMember { key: Vec<u8>, count: Option<i64>, withscores: bool, }, ZScan { key: Vec<u8>, cursor: u64, pattern: Option<String>, count: Option<usize>, }, XAdd { key: Vec<u8>, id: Vec<u8>, fields: Vec<(Vec<u8>, Vec<u8>)>, maxlen: Option<usize>, }, XLen { key: Vec<u8>, }, XRange { key: Vec<u8>, start: Vec<u8>, end: Vec<u8>, count: Option<usize>, }, XRevRange { key: Vec<u8>, start: Vec<u8>, end: Vec<u8>, count: Option<usize>, }, XRead { keys: Vec<Vec<u8>>, ids: Vec<Vec<u8>>, count: Option<usize>, }, XTrim { key: Vec<u8>, maxlen: usize, }, ObjectFreq { key: Vec<u8>, }, ObjectEncoding { key: Vec<u8>, }, StatsHotkeys { count: usize, }, StatsLatency { command: Vec<u8>, percentiles: Vec<f64>, }, StatsMemory { prefixes: Vec<Vec<u8>>, }, Subscribe { channels: Vec<Vec<u8>>, }, Unsubscribe { channels: Vec<Vec<u8>>, }, PSubscribe { patterns: Vec<Vec<u8>>, }, PUnsubscribe { patterns: Vec<Vec<u8>>, }, Publish { channel: Vec<u8>, message: Vec<u8>, }, PfAdd { key: Vec<u8>, elements: Vec<Vec<u8>>, }, PfCount { keys: Vec<Vec<u8>>, }, PfMerge { destkey: Vec<u8>, sourcekeys: Vec<Vec<u8>>, }, SetBit { key: Vec<u8>, offset: u64, value: u8, }, GetBit { key: Vec<u8>, offset: u64, }, BitCount { key: Vec<u8>, start: Option<i64>, end: Option<i64>, use_bit: bool, }, BitOp { operation: BitOperation, destkey: Vec<u8>, keys: Vec<Vec<u8>>, }, BitPos { key: Vec<u8>, bit: u8, start: Option<i64>, end: Option<i64>, use_bit: bool, }, BitField { key: Vec<u8>, operations: Vec<BitFieldOperation>, }, GeoAdd { key: Vec<u8>, nx: bool, xx: bool, ch: bool, members: Vec<(f64, f64, Vec<u8>)>, }, GeoDist { key: Vec<u8>, member1: Vec<u8>, member2: Vec<u8>, unit: GeoUnit, }, GeoHash { key: Vec<u8>, members: Vec<Vec<u8>>, }, GeoPos { key: Vec<u8>, members: Vec<Vec<u8>>, }, GeoSearch { key: Vec<u8>, from_member: Option<Vec<u8>>, from_lonlat: Option<(f64, f64)>, radius: f64, unit: GeoUnit, asc: Option<bool>, count: Option<usize>, withcoord: bool, withdist: bool, withhash: bool, }, BLPop { keys: Vec<Vec<u8>>, timeout: f64, }, BRPop { keys: Vec<Vec<u8>>, timeout: f64, }, BLMove { source: Vec<u8>, destination: Vec<u8>, from_left: bool, to_left: bool, timeout: f64, }, BZPopMin { keys: Vec<Vec<u8>>, timeout: f64, }, BZPopMax { keys: Vec<Vec<u8>>, timeout: f64, }, XGroupCreate { key: Vec<u8>, group: String, id: String, mkstream: bool, }, XGroupDestroy { key: Vec<u8>, group: String, }, XGroupDelConsumer { key: Vec<u8>, group: String, consumer: String, }, XReadGroup { group: String, consumer: String, count: Option<usize>, keys: Vec<Vec<u8>>, ids: Vec<Vec<u8>>, }, XAck { key: Vec<u8>, group: String, ids: Vec<Vec<u8>>, }, XPending { key: Vec<u8>, group: String, start: Option<Vec<u8>>, end: Option<Vec<u8>>, count: Option<usize>, }, XClaim { key: Vec<u8>, group: String, consumer: String, min_idle_time: u64, ids: Vec<Vec<u8>>, }, XAutoClaim { key: Vec<u8>, group: String, consumer: String, min_idle_time: u64, start: Vec<u8>, count: Option<usize>, }, XInfoStream { key: Vec<u8>, }, XInfoGroups { key: Vec<u8>, }, XDel { key: Vec<u8>, ids: Vec<Vec<u8>>, },
}
Expand description

A parsed command ready for execution by a shard.

Variants§

§

Get

GET key

Fields

§key: Vec<u8>

The key to retrieve.

§

Set

SET key value [EX seconds] [PX millis] [NX|XX]

Fields

§key: Vec<u8>

The key.

§value: Vec<u8>

The value.

§ex: Option<u64>

Optional TTL in seconds.

§px: Option<u64>

Optional TTL in milliseconds.

§nx: bool

Only set if key does not exist.

§xx: bool

Only set if key already exists.

§

GetSet

GETSET key value (deprecated but supported)

Fields

§key: Vec<u8>

The key.

§value: Vec<u8>

The new value.

§

Append

APPEND key value

Fields

§key: Vec<u8>

The key.

§value: Vec<u8>

The value to append.

§

Strlen

STRLEN key

Fields

§key: Vec<u8>

The key.

§

Incr

INCR key

Fields

§key: Vec<u8>

The key.

§

Decr

DECR key

Fields

§key: Vec<u8>

The key.

§

IncrBy

INCRBY key delta

Fields

§key: Vec<u8>

The key.

§delta: i64

The increment amount.

§

DecrBy

DECRBY key delta

Fields

§key: Vec<u8>

The key.

§delta: i64

The decrement amount.

§

MGet

MGET key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to retrieve.

§

MSet

MSET key value [key value …]

Fields

§entries: Vec<(Vec<u8>, Vec<u8>)>

Key-value pairs to set.

§

SetNx

SETNX key value

Fields

§key: Vec<u8>

The key.

§value: Vec<u8>

The value.

§

IncrByFloat

INCRBYFLOAT key delta

Fields

§key: Vec<u8>

The key.

§delta: f64

The float increment amount.

§

GetRange

GETRANGE key start end

Fields

§key: Vec<u8>

The key.

§start: i64

Start offset.

§end: i64

End offset (inclusive).

§

SetRange

SETRANGE key offset value

Fields

§key: Vec<u8>

The key.

§offset: usize

Byte offset.

§value: Vec<u8>

Value to write at offset.

§

GetDel

GETDEL key

Fields

§key: Vec<u8>

The key.

§

GetEx

GETEX key [EX seconds | PX millis | EXAT timestamp | PXAT timestamp_ms | PERSIST]

Fields

§key: Vec<u8>

The key.

§ex: Option<u64>

Optional TTL in seconds.

§px: Option<u64>

Optional TTL in milliseconds.

§exat: Option<u64>

Optional absolute Unix timestamp (seconds).

§pxat: Option<u64>

Optional absolute Unix timestamp (milliseconds).

§persist: bool

Whether to remove TTL.

§

MSetNx

MSETNX key value [key value …]

Fields

§entries: Vec<(Vec<u8>, Vec<u8>)>

Key-value pairs to set.

§

Del

DEL key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to delete.

§

Exists

EXISTS key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to check.

§

Expire

EXPIRE key seconds

Fields

§key: Vec<u8>

The key.

§seconds: u64

TTL in seconds.

§

PExpire

PEXPIRE key milliseconds

Fields

§key: Vec<u8>

The key.

§millis: u64

TTL in milliseconds.

§

Persist

PERSIST key

Fields

§key: Vec<u8>

The key.

§

Ttl

TTL key

Fields

§key: Vec<u8>

The key.

§

PTtl

PTTL key

Fields

§key: Vec<u8>

The key.

§

Type

TYPE key

Fields

§key: Vec<u8>

The key.

§

Keys

KEYS pattern

Fields

§pattern: String

Glob pattern to match.

§

Scan

SCAN cursor [MATCH pattern] [COUNT count]

Fields

§cursor: u64

The cursor position.

§pattern: Option<String>

Optional glob pattern filter.

§count: Option<usize>

Optional count hint.

§

ExpireAt

EXPIREAT key timestamp

Fields

§key: Vec<u8>

The key.

§timestamp: u64

Absolute Unix timestamp in seconds.

§

PExpireAt

PEXPIREAT key timestamp_ms

Fields

§key: Vec<u8>

The key.

§timestamp_ms: u64

Absolute Unix timestamp in milliseconds.

§

Rename

RENAME key newkey

Fields

§key: Vec<u8>

The source key.

§newkey: Vec<u8>

The destination key.

§

RenameNx

RENAMENX key newkey

Fields

§key: Vec<u8>

The source key.

§newkey: Vec<u8>

The destination key.

UNLINK key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to unlink.

§

Copy

COPY source destination [REPLACE]

Fields

§source: Vec<u8>

The source key.

§destination: Vec<u8>

The destination key.

§replace: bool

Whether to overwrite the destination.

§

RandomKey

RANDOMKEY

§

Touch

TOUCH key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to touch.

§

ObjectRefCount

OBJECT REFCOUNT key

Fields

§key: Vec<u8>

The key.

§

ObjectIdleTime

OBJECT IDLETIME key

Fields

§key: Vec<u8>

The key.

§

ObjectHelp

OBJECT HELP

§

DbSize

DBSIZE

§

FlushDb

FLUSHDB

§

LPush

LPUSH key value [value …]

Fields

§key: Vec<u8>

The key.

§values: Vec<Vec<u8>>

Values to push.

§

RPush

RPUSH key value [value …]

Fields

§key: Vec<u8>

The key.

§values: Vec<Vec<u8>>

Values to push.

§

LPop

LPOP key

Fields

§key: Vec<u8>

The key.

§

RPop

RPOP key

Fields

§key: Vec<u8>

The key.

§

LLen

LLEN key

Fields

§key: Vec<u8>

The key.

§

LRange

LRANGE key start stop

Fields

§key: Vec<u8>

The key.

§start: i64

Start index (0-based, negative from end).

§stop: i64

Stop index (inclusive, negative from end).

§

LIndex

LINDEX key index

Fields

§key: Vec<u8>

The key.

§index: i64

The index (negative from end).

§

LSet

LSET key index value

Fields

§key: Vec<u8>

The key.

§index: i64

The index.

§value: Vec<u8>

The value to set.

§

LInsert

LINSERT key BEFORE|AFTER pivot value

Fields

§key: Vec<u8>

The key.

§before: bool

Insert before pivot if true, after if false.

§pivot: Vec<u8>

The pivot element.

§value: Vec<u8>

The value to insert.

§

LRem

LREM key count value

Fields

§key: Vec<u8>

The key.

§count: i64

Count: >0 from head, <0 from tail, 0 = all.

§value: Vec<u8>

The value to remove.

§

LTrim

LTRIM key start stop

Fields

§key: Vec<u8>

The key.

§start: i64

Start index.

§stop: i64

Stop index (inclusive).

§

LPos

LPOS key value [RANK rank] [COUNT count] [MAXLEN len]

Fields

§key: Vec<u8>

The key.

§value: Vec<u8>

The value to search for.

§rank: Option<i64>

Rank parameter (skip N matches).

§count: Option<i64>

Count parameter (return N positions, 0 = all).

§maxlen: Option<i64>

Maximum elements to scan.

§

RPopLPush

RPOPLPUSH source destination

Fields

§source: Vec<u8>

The source key.

§destination: Vec<u8>

The destination key.

§

LMove

LMOVE source destination LEFT|RIGHT LEFT|RIGHT

Fields

§source: Vec<u8>

The source key.

§destination: Vec<u8>

The destination key.

§from_left: bool

Pop from left side of source if true, right if false.

§to_left: bool

Push to left side of destination if true, right if false.

§

HSet

HSET key field value [field value …]

Fields

§key: Vec<u8>

The key.

§fields: Vec<(Vec<u8>, Vec<u8>)>

Field-value pairs.

§

HGet

HGET key field

Fields

§key: Vec<u8>

The key.

§field: Vec<u8>

The field name.

§

HDel

HDEL key field [field …]

Fields

§key: Vec<u8>

The key.

§fields: Vec<Vec<u8>>

Fields to delete.

§

HGetAll

HGETALL key

Fields

§key: Vec<u8>

The key.

§

HLen

HLEN key

Fields

§key: Vec<u8>

The key.

§

HExists

HEXISTS key field

Fields

§key: Vec<u8>

The key.

§field: Vec<u8>

The field name.

§

HIncrBy

HINCRBY key field increment

Fields

§key: Vec<u8>

The key.

§field: Vec<u8>

The field name.

§delta: i64

The increment amount.

§

HMGet

HMGET key field [field …]

Fields

§key: Vec<u8>

The key.

§fields: Vec<Vec<u8>>

Fields to retrieve.

§

HKeys

HKEYS key

Fields

§key: Vec<u8>

The key.

§

HVals

HVALS key

Fields

§key: Vec<u8>

The key.

§

HSetNx

HSETNX key field value

Fields

§key: Vec<u8>

The key.

§field: Vec<u8>

The field name.

§value: Vec<u8>

The value.

§

HIncrByFloat

HINCRBYFLOAT key field delta

Fields

§key: Vec<u8>

The key.

§field: Vec<u8>

The field name.

§delta: f64

The float increment amount.

§

HRandField

HRANDFIELD key [count [WITHVALUES]]

Fields

§key: Vec<u8>

The key.

§count: Option<i64>

Optional count (negative = allow duplicates).

§withvalues: bool

Whether to include values.

§

HScan

HSCAN key cursor [MATCH pattern] [COUNT count]

Fields

§key: Vec<u8>

The key.

§cursor: u64

The cursor position.

§pattern: Option<String>

Optional glob pattern filter.

§count: Option<usize>

Optional count hint.

§

SAdd

SADD key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to add.

§

SRem

SREM key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to remove.

§

SMembers

SMEMBERS key

Fields

§key: Vec<u8>

The key.

§

SIsMember

SISMEMBER key member

Fields

§key: Vec<u8>

The key.

§member: Vec<u8>

The member to check.

§

SCard

SCARD key

Fields

§key: Vec<u8>

The key.

§

SPop

SPOP key [count]

Fields

§key: Vec<u8>

The key.

§count: Option<usize>

Optional count of members to pop.

§

SRandMember

SRANDMEMBER key [count]

Fields

§key: Vec<u8>

The key.

§count: Option<i64>

Optional count (negative = allow duplicates).

§

SUnion

SUNION key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys of the sets.

§

SUnionStore

SUNIONSTORE destination key [key …]

Fields

§destination: Vec<u8>

The destination key.

§keys: Vec<Vec<u8>>

The source set keys.

§

SInter

SINTER key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys of the sets.

§

SInterStore

SINTERSTORE destination key [key …]

Fields

§destination: Vec<u8>

The destination key.

§keys: Vec<Vec<u8>>

The source set keys.

§

SDiff

SDIFF key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys of the sets.

§

SDiffStore

SDIFFSTORE destination key [key …]

Fields

§destination: Vec<u8>

The destination key.

§keys: Vec<Vec<u8>>

The source set keys.

§

SInterCard

SINTERCARD numkeys key [key …] [LIMIT limit]

Fields

§numkeys: usize

Number of keys.

§keys: Vec<Vec<u8>>

The keys of the sets.

§limit: Option<usize>

Optional limit on the count.

§

SMove

SMOVE source destination member

Fields

§source: Vec<u8>

The source key.

§destination: Vec<u8>

The destination key.

§member: Vec<u8>

The member to move.

§

SMisMember

SMISMEMBER key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to check.

§

SScan

SSCAN key cursor [MATCH pattern] [COUNT count]

Fields

§key: Vec<u8>

The key.

§cursor: u64

The cursor position.

§pattern: Option<String>

Optional glob pattern filter.

§count: Option<usize>

Optional count hint.

§

Ping

PING [message]

Fields

§message: Option<Vec<u8>>

Optional message to echo back.

§

Echo

ECHO message

Fields

§message: Vec<u8>

The message to echo.

§

Info

INFO [section]

Fields

§section: Option<String>

Optional section filter.

§

BgSave

BGSAVE — trigger a background RDB snapshot.

§

BgRewriteAof

BGREWRITEAOF — trigger a WAL rewrite.

§

FlushAll

FLUSHALL — flush all databases.

§

CommandInfo

COMMAND [INFO [command …]] — returns command metadata.

Fields

§names: Vec<Vec<u8>>

Optional command names to fetch metadata for. Empty means all commands.

§

Hello

HELLO [protover] — protocol version negotiation (RESP3).

Fields

§version: Option<u8>

Requested protocol version (2 or 3).

§

Auth

AUTH password — authenticate the connection.

Fields

§password: Vec<u8>

Password.

§

Dump

DUMP — extract all key-value entries from a shard (internal).

§

Multi

MULTI — start a transaction block.

§

Exec

EXEC — execute all queued commands in a transaction.

§

Discard

DISCARD — discard all queued commands in a transaction.

§

Watch

WATCH key [key …] — optimistic locking (accepted, not enforced).

Fields

§keys: Vec<Vec<u8>>

Keys to watch.

§

Unwatch

UNWATCH — clear all watched keys.

§

ConfigGet

CONFIG GET pattern

Fields

§pattern: String

Glob pattern for config keys.

§

ConfigSet

CONFIG SET parameter value

Fields

§parameter: String

Config parameter name.

§value: String

Config value.

§

ConfigResetStat

CONFIG RESETSTAT

§

ClientId

CLIENT ID — return connection unique ID.

§

ClientGetName

CLIENT GETNAME — return connection name.

§

ClientSetName

CLIENT SETNAME name — set connection name.

Fields

§name: Vec<u8>

The connection name.

§

ClientList

CLIENT LIST — list all connections.

§

ClientInfo

CLIENT INFO — current connection info.

§

Time

TIME — return server time.

§

Select

SELECT db — select database (only db 0 supported).

Fields

§db: i64

Database index.

§

Quit

QUIT — close connection gracefully.

§

Wait

WAIT numreplicas timeout — wait for replication acknowledgements.

Fields

§numreplicas: i64

Number of replicas to wait for.

§timeout: i64

Timeout in milliseconds.

§

CommandCount

COMMAND COUNT — return number of supported commands.

§

CommandList

COMMAND LIST — return the names of supported commands.

§

CommandHelp

COMMAND HELP — return command help text.

§

CommandDocs

COMMAND DOCS [command …] — return command documentation metadata.

Fields

§names: Vec<Vec<u8>>

Optional command names to fetch docs for. Empty means all commands.

§

DocCreate

DOC.CREATE collection [COMPRESSION profile] — create a collection.

Fields

§collection: Vec<u8>

Collection name.

§compression: Option<Vec<u8>>

Optional compression profile name.

§

DocDrop

DOC.DROP collection — drop a collection.

Fields

§collection: Vec<u8>

Collection name.

§

DocInfo

DOC.INFO collection — collection metadata.

Fields

§collection: Vec<u8>

Collection name.

§

DocDictInfo

DOC.DICTINFO collection — dictionary statistics for a collection.

Fields

§collection: Vec<u8>

Collection name.

§

DocStorage

DOC.STORAGE collection — storage statistics for a collection.

Fields

§collection: Vec<u8>

Collection name.

§

DocSet

DOC.SET collection doc_id json — insert or replace a document.

Fields

§collection: Vec<u8>

Collection name.

§doc_id: Vec<u8>

External document ID.

§json: Vec<u8>

JSON payload bytes.

§

DocInsert

DOC.INSERT collection json — insert with auto-generated ID.

Fields

§collection: Vec<u8>

Collection name.

§json: Vec<u8>

JSON payload bytes.

§

DocMSet

DOC.MSET collection doc_id json [doc_id json …] — batch insert/replace.

Fields

§collection: Vec<u8>

Collection name.

§entries: Vec<(Vec<u8>, Vec<u8>)>

Batch entries as (doc_id, json_payload).

§

DocGet

DOC.GET collection doc_id [FIELDS path …] — fetch a document.

Fields

§collection: Vec<u8>

Collection name.

§doc_id: Vec<u8>

External document ID.

§fields: Vec<Vec<u8>>

Optional projection paths. Empty means full document.

§

DocMGet

DOC.MGET collection doc_id [doc_id …] — batch fetch.

Fields

§collection: Vec<u8>

Collection name.

§doc_ids: Vec<Vec<u8>>

External document IDs.

§

DocUpdate

DOC.UPDATE collection doc_id <mutation…> — apply field-level mutations.

Fields

§collection: Vec<u8>

Collection name.

§doc_id: Vec<u8>

External document ID.

§mutations: Vec<DocUpdateMutation>

Mutation operations to apply in order.

§

DocDel

DOC.DEL collection doc_id — delete a document.

Fields

§collection: Vec<u8>

Collection name.

§doc_id: Vec<u8>

External document ID.

§

DocExists

DOC.EXISTS collection doc_id — check document existence.

Fields

§collection: Vec<u8>

Collection name.

§doc_id: Vec<u8>

External document ID.

§

DocCreateIndex

DOC.CREATEINDEX collection field type — create a secondary index.

Fields

§collection: Vec<u8>

Collection name.

§field: Vec<u8>

Dotted field path.

§index_type: Vec<u8>

Index type string (hash, sorted, array, unique).

§

DocDropIndex

DOC.DROPINDEX collection field — drop a secondary index.

Fields

§collection: Vec<u8>

Collection name.

§field: Vec<u8>

Dotted field path.

§

DocIndexes

DOC.INDEXES collection — list indexes.

Fields

§collection: Vec<u8>

Collection name.

§

DocFind

DOC.FIND collection WHERE expr [ORDER BY field [ASC|DESC]] [PROJECT f1 f2 …] [LIMIT n] [OFFSET n]

Fields

§collection: Vec<u8>

Collection name.

§where_clause: Vec<u8>

WHERE expression string.

§fields: Vec<Vec<u8>>

Optional projection field paths.

§limit: Option<usize>

Optional result limit.

§offset: usize

Result offset (default 0).

§order_by: Option<Vec<u8>>

Optional field path to sort results by.

§order_desc: bool

True if sort order is descending (default ascending).

§

DocCount

DOC.COUNT collection WHERE expr

Fields

§collection: Vec<u8>

Collection name.

§where_clause: Vec<u8>

WHERE expression string.

§

CdcPoll

CDCPOLL cursor count — poll CDC events from a shard.

Fields

§cursor: u64

Cursor position (sequence number).

§count: usize

Maximum events to return.

§

CdcGroupCreate

CDC.GROUP CREATE key group start_seq — create a consumer group.

Fields

§key: Vec<u8>

The CDC stream key.

§group: String

Consumer group name.

§start_seq: u64

Starting sequence number.

§

CdcGroupRead

CDC.GROUP READ key group consumer count — read from a consumer group.

Fields

§key: Vec<u8>

The CDC stream key.

§group: String

Consumer group name.

§consumer: String

Consumer name within the group.

§count: usize

Maximum events to return.

§

CdcAck

CDC.ACK key group seq [seq …] — acknowledge events.

Fields

§key: Vec<u8>

The CDC stream key.

§group: String

Consumer group name.

§seqs: Vec<u64>

Sequence numbers to acknowledge.

§

CdcPending

CDC.PENDING key group — list pending entries.

Fields

§key: Vec<u8>

The CDC stream key.

§group: String

Consumer group name.

§

VecSet

VECSET key dim v1 v2 … — store a vector.

Fields

§key: Vec<u8>

The key.

§dimensions: usize

Vector dimensions.

§vector: Vec<f32>

The vector components.

§

VecQuery

VECQUERY key k v1 v2 … — query nearest neighbors.

Fields

§key: Vec<u8>

The index key.

§k: usize

Number of neighbors.

§vector: Vec<f32>

Query vector.

§

VecDel

VECDEL key — delete a vector.

Fields

§key: Vec<u8>

The key.

§

ZAdd

ZADD key score member [score member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<(f64, Vec<u8>)>

Score-member pairs.

§

ZRem

ZREM key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to remove.

§

ZScore

ZSCORE key member

Fields

§key: Vec<u8>

The key.

§member: Vec<u8>

The member.

§

ZRank

ZRANK key member

Fields

§key: Vec<u8>

The key.

§member: Vec<u8>

The member.

§

ZRevRank

ZREVRANK key member

Fields

§key: Vec<u8>

The key.

§member: Vec<u8>

The member.

§

ZCard

ZCARD key

Fields

§key: Vec<u8>

The key.

§

ZRange

ZRANGE key start stop [WITHSCORES]

Fields

§key: Vec<u8>

The key.

§start: i64

Start index (0-based, negative from end).

§stop: i64

Stop index (inclusive, negative from end).

§withscores: bool

Whether to include scores in output.

§

ZRevRange

ZREVRANGE key start stop [WITHSCORES]

Fields

§key: Vec<u8>

The key.

§start: i64

Start index (0-based, negative from end).

§stop: i64

Stop index (inclusive, negative from end).

§withscores: bool

Whether to include scores in output.

§

ZRangeByScore

ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]

Fields

§key: Vec<u8>

The key.

§min: f64

Minimum score (inclusive).

§max: f64

Maximum score (inclusive).

§withscores: bool

Whether to include scores in output.

§offset: Option<usize>

Optional offset for LIMIT.

§count: Option<usize>

Optional count for LIMIT.

§

ZIncrBy

ZINCRBY key increment member

Fields

§key: Vec<u8>

The key.

§delta: f64

The increment amount.

§member: Vec<u8>

The member.

§

ZCount

ZCOUNT key min max

Fields

§key: Vec<u8>

The key.

§min: f64

Minimum score (inclusive).

§max: f64

Maximum score (inclusive).

§

ZRevRangeByScore

ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]

Fields

§key: Vec<u8>

The key.

§max: f64

Maximum score.

§min: f64

Minimum score.

§withscores: bool

Whether to include scores in output.

§offset: Option<usize>

Optional offset for LIMIT.

§count: Option<usize>

Optional count for LIMIT.

§

ZPopMin

ZPOPMIN key [count]

Fields

§key: Vec<u8>

The key.

§count: Option<usize>

Optional count of members to pop.

§

ZPopMax

ZPOPMAX key [count]

Fields

§key: Vec<u8>

The key.

§count: Option<usize>

Optional count of members to pop.

§

ZRangeByLex

ZRANGEBYLEX key min max [LIMIT offset count]

Fields

§key: Vec<u8>

The key.

§min: Vec<u8>

Lexicographic minimum (e.g. “-”, “[a”, “(a”).

§max: Vec<u8>

Lexicographic maximum (e.g. “+”, “[z”, “(z”).

§offset: Option<usize>

Optional offset for LIMIT.

§count: Option<usize>

Optional count for LIMIT.

§

ZRevRangeByLex

ZREVRANGEBYLEX key max min [LIMIT offset count]

Fields

§key: Vec<u8>

The key.

§max: Vec<u8>

Lexicographic maximum.

§min: Vec<u8>

Lexicographic minimum.

§offset: Option<usize>

Optional offset for LIMIT.

§count: Option<usize>

Optional count for LIMIT.

§

ZLexCount

ZLEXCOUNT key min max

Fields

§key: Vec<u8>

The key.

§min: Vec<u8>

Lexicographic minimum.

§max: Vec<u8>

Lexicographic maximum.

§

ZMScore

ZMSCORE key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to query.

§

ZRandMember

ZRANDMEMBER key [count [WITHSCORES]]

Fields

§key: Vec<u8>

The key.

§count: Option<i64>

Optional count (negative = allow duplicates).

§withscores: bool

Whether to include scores.

§

ZScan

ZSCAN key cursor [MATCH pattern] [COUNT count]

Fields

§key: Vec<u8>

The key.

§cursor: u64

The cursor position.

§pattern: Option<String>

Optional glob pattern filter.

§count: Option<usize>

Optional count hint.

§

XAdd

XADD key [MAXLEN count] id field value [field value …]

Fields

§key: Vec<u8>

The key.

§id: Vec<u8>

The entry ID (usually “*” for auto-generate).

§fields: Vec<(Vec<u8>, Vec<u8>)>

Field-value pairs for the entry.

§maxlen: Option<usize>

Optional MAXLEN trimming threshold.

§

XLen

XLEN key

Fields

§key: Vec<u8>

The key.

§

XRange

XRANGE key start end [COUNT count]

Fields

§key: Vec<u8>

The key.

§start: Vec<u8>

Start ID (or “-” for minimum).

§end: Vec<u8>

End ID (or “+” for maximum).

§count: Option<usize>

Optional maximum number of entries to return.

§

XRevRange

XREVRANGE key end start [COUNT count]

Fields

§key: Vec<u8>

The key.

§start: Vec<u8>

Start ID (or “+” for maximum, reversed semantics).

§end: Vec<u8>

End ID (or “-” for minimum, reversed semantics).

§count: Option<usize>

Optional maximum number of entries to return.

§

XRead

XREAD [COUNT count] STREAMS key [key …] id [id …]

Fields

§keys: Vec<Vec<u8>>

Keys to read from.

§ids: Vec<Vec<u8>>

IDs to read after (one per key).

§count: Option<usize>

Optional maximum number of entries per key.

§

XTrim

XTRIM key MAXLEN count

Fields

§key: Vec<u8>

The key.

§maxlen: usize

Maximum number of entries to keep.

§

ObjectFreq

OBJECT FREQ key — return the LFU frequency counter.

Fields

§key: Vec<u8>

The key.

§

ObjectEncoding

OBJECT ENCODING key — return the encoding type.

Fields

§key: Vec<u8>

The key.

§

StatsHotkeys

STATS.HOTKEYS count — return top hot keys.

Fields

§count: usize

Number of hot keys to return.

§

StatsLatency

STATS.LATENCY command p1 p2 … — return latency percentiles.

Fields

§command: Vec<u8>

Command name (e.g. “GET”).

§percentiles: Vec<f64>

Percentile values to return (e.g. [50.0, 99.0, 99.9]).

§

StatsMemory

STATS.MEMORY prefix … — return memory usage for key prefixes.

Fields

§prefixes: Vec<Vec<u8>>

Key prefixes to query.

§

Subscribe

SUBSCRIBE channel [channel …]

Fields

§channels: Vec<Vec<u8>>

Channels to subscribe to.

§

Unsubscribe

UNSUBSCRIBE [channel …]

Fields

§channels: Vec<Vec<u8>>

Channels to unsubscribe from (empty = all).

§

PSubscribe

PSUBSCRIBE pattern [pattern …]

Fields

§patterns: Vec<Vec<u8>>

Glob patterns to subscribe to.

§

PUnsubscribe

PUNSUBSCRIBE [pattern …]

Fields

§patterns: Vec<Vec<u8>>

Glob patterns to unsubscribe from (empty = all).

§

Publish

PUBLISH channel message

Fields

§channel: Vec<u8>

The target channel.

§message: Vec<u8>

The message payload.

§

PfAdd

PFADD key element [element …]

Fields

§key: Vec<u8>

The key.

§elements: Vec<Vec<u8>>

Elements to add to the HyperLogLog.

§

PfCount

PFCOUNT key [key …]

Fields

§keys: Vec<Vec<u8>>

The keys to count (union cardinality when multiple).

§

PfMerge

PFMERGE destkey sourcekey [sourcekey …]

Fields

§destkey: Vec<u8>

The destination key.

§sourcekeys: Vec<Vec<u8>>

The source keys to merge from.

§

SetBit

SETBIT key offset value

Fields

§key: Vec<u8>

The key.

§offset: u64

The bit offset.

§value: u8

The bit value (0 or 1).

§

GetBit

GETBIT key offset

Fields

§key: Vec<u8>

The key.

§offset: u64

The bit offset.

§

BitCount

BITCOUNT key [start end [BYTE|BIT]]

Fields

§key: Vec<u8>

The key.

§start: Option<i64>

Optional start offset.

§end: Option<i64>

Optional end offset.

§use_bit: bool

True if offsets are in bits, false (default) for bytes.

§

BitOp

BITOP AND|OR|XOR|NOT destkey key [key …]

Fields

§operation: BitOperation

The bitwise operation.

§destkey: Vec<u8>

The destination key.

§keys: Vec<Vec<u8>>

The source keys.

§

BitPos

BITPOS key bit [start [end [BYTE|BIT]]]

Fields

§key: Vec<u8>

The key.

§bit: u8

The bit value to search for (0 or 1).

§start: Option<i64>

Optional start offset.

§end: Option<i64>

Optional end offset.

§use_bit: bool

True if offsets are in bits, false (default) for bytes.

§

BitField

BITFIELD key [GET|SET|INCRBY|OVERFLOW …]

Fields

§key: Vec<u8>

The key.

§operations: Vec<BitFieldOperation>

Ordered BITFIELD operations to execute.

§

GeoAdd

GEOADD key [NX|XX] [CH] longitude latitude member […]

Fields

§key: Vec<u8>

The key.

§nx: bool

Only add new members, don’t update existing.

§xx: bool

Only update existing members, don’t add new.

§ch: bool

Return number of changed elements instead of added.

§members: Vec<(f64, f64, Vec<u8>)>

Longitude, latitude, member triples.

§

GeoDist

GEODIST key member1 member2 [m|km|ft|mi]

Fields

§key: Vec<u8>

The key.

§member1: Vec<u8>

First member.

§member2: Vec<u8>

Second member.

§unit: GeoUnit

Distance unit (default: meters).

§

GeoHash

GEOHASH key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to get geohash strings for.

§

GeoPos

GEOPOS key member [member …]

Fields

§key: Vec<u8>

The key.

§members: Vec<Vec<u8>>

Members to get positions for.

§

GeoSearch

GEOSEARCH key FROMMEMBER member|FROMLONLAT lon lat BYRADIUS radius unit [ASC|DESC] [COUNT count] [WITHCOORD] [WITHDIST] [WITHHASH]

Fields

§key: Vec<u8>

The key.

§from_member: Option<Vec<u8>>

Member to search from (mutually exclusive with from_lonlat).

§from_lonlat: Option<(f64, f64)>

Longitude/latitude to search from (mutually exclusive with from_member).

§radius: f64

Search radius.

§unit: GeoUnit

Radius unit.

§asc: Option<bool>

Sort ascending if true, descending if false, unsorted if None.

§count: Option<usize>

Maximum number of results.

§withcoord: bool

Include coordinates in response.

§withdist: bool

Include distance in response.

§withhash: bool

Include geohash in response.

§

BLPop

BLPOP key [key …] timeout

Fields

§keys: Vec<Vec<u8>>

Keys to pop from (tried in order).

§timeout: f64

Timeout in seconds (0 = try once).

§

BRPop

BRPOP key [key …] timeout

Fields

§keys: Vec<Vec<u8>>

Keys to pop from (tried in order).

§timeout: f64

Timeout in seconds (0 = try once).

§

BLMove

BLMOVE source destination LEFT|RIGHT LEFT|RIGHT timeout

Fields

§source: Vec<u8>

The source key.

§destination: Vec<u8>

The destination key.

§from_left: bool

Pop from left side of source if true, right if false.

§to_left: bool

Push to left side of destination if true, right if false.

§timeout: f64

Timeout in seconds (0 = try once).

§

BZPopMin

BZPOPMIN key [key …] timeout

Fields

§keys: Vec<Vec<u8>>

Keys to pop from (tried in order).

§timeout: f64

Timeout in seconds (0 = try once).

§

BZPopMax

BZPOPMAX key [key …] timeout

Fields

§keys: Vec<Vec<u8>>

Keys to pop from (tried in order).

§timeout: f64

Timeout in seconds (0 = try once).

§

XGroupCreate

XGROUP CREATE key group id [MKSTREAM]

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§id: String

Starting ID (“$” or “0” or specific ID).

§mkstream: bool

Create stream if it does not exist.

§

XGroupDestroy

XGROUP DESTROY key group

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§

XGroupDelConsumer

XGROUP DELCONSUMER key group consumer

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§consumer: String

Consumer name.

§

XReadGroup

XREADGROUP GROUP group consumer [COUNT count] STREAMS key [key …] id [id …]

Fields

§group: String

Consumer group name.

§consumer: String

Consumer name.

§count: Option<usize>

Optional max entries per key.

§keys: Vec<Vec<u8>>

Keys to read from.

§ids: Vec<Vec<u8>>

IDs to read after (one per key, “>” for new).

§

XAck

XACK key group id [id …]

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§ids: Vec<Vec<u8>>

IDs to acknowledge.

§

XPending

XPENDING key group [start end count]

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§start: Option<Vec<u8>>

Optional start ID filter.

§end: Option<Vec<u8>>

Optional end ID filter.

§count: Option<usize>

Optional count limit.

§

XClaim

XCLAIM key group consumer min-idle-time id [id …]

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§consumer: String

Consumer claiming the messages.

§min_idle_time: u64

Minimum idle time in milliseconds.

§ids: Vec<Vec<u8>>

IDs to claim.

§

XAutoClaim

XAUTOCLAIM key group consumer min-idle-time start [COUNT count]

Fields

§key: Vec<u8>

The stream key.

§group: String

Consumer group name.

§consumer: String

Consumer claiming the messages.

§min_idle_time: u64

Minimum idle time in milliseconds.

§start: Vec<u8>

Start ID for scanning.

§count: Option<usize>

Optional count of entries to claim.

§

XInfoStream

XINFO STREAM key

Fields

§key: Vec<u8>

The stream key.

§

XInfoGroups

XINFO GROUPS key

Fields

§key: Vec<u8>

The stream key.

§

XDel

XDEL key id [id …]

Fields

§key: Vec<u8>

The stream key.

§ids: Vec<Vec<u8>>

IDs to delete.

Implementations§

Source§

impl Command

Source

pub fn key(&self) -> Option<&[u8]>

Extract the primary key for routing, if this is a single-key command.

Source

pub fn is_multi_key(&self) -> bool

Returns true if this command operates on multiple keys that may span shards.

Source

pub fn is_keyless(&self) -> bool

Returns true if this is a keyless/server command.

Source

pub fn is_mutation(&self) -> bool

Returns true if this command mutates data (for WAL logging).

Source

pub fn cmd_type(&self) -> u8

Return a numeric type index for stats tracking.

Source

pub fn ttl_duration(ex: Option<u64>, px: Option<u64>) -> Option<Duration>

Get the TTL duration from EX/PX options.

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.