Skip to main content

Module command

Module command 

Source
Expand description

Command and response types. Command and response types for the Kōra engine.

Command is the parsed, type-safe representation of every operation the engine supports — strings, lists, sets, hashes, sorted sets, streams, HyperLogLog, bitmaps, geo, vectors, pub/sub, transactions, and server management. The protocol crate parses raw RESP frames into Command variants, and the shard engine pattern-matches on them for execution.

CommandResponse is the corresponding output type. Variants map directly to RESP wire types (simple string, error, integer, bulk string, array, nil) plus a BulkStringShared variant that allows zero-copy responses via Arc<[u8]>.

Helper methods on Command (key(), is_multi_key(), is_mutation(), cmd_type()) drive the engine’s routing and WAL logic.

Structs§

BitFieldEncoding
Integer encoding used by BITFIELD subcommands.

Enums§

BitFieldOffset
Offset format used by BITFIELD subcommands.
BitFieldOperation
A parsed BITFIELD subcommand.
BitFieldOverflow
Overflow behavior for BITFIELD mutation operations.
BitOperation
Bitwise operation for BITOP command.
Command
A parsed command ready for execution by a shard.
CommandResponse
Response from executing a command on a shard.
DocUpdateMutation
One DOC.UPDATE mutation operation.
GeoUnit
Distance unit for geo commands.

Constants§

COMMAND_HELP_LINES
Human-readable help text for the COMMAND HELP reply.
SUPPORTED_COMMAND_NAMES
Canonical supported command names exposed by COMMAND LIST.

Functions§

command_docs_response
Build a COMMAND DOCS response.
command_help_response
Build a COMMAND HELP response.
command_info_response
Build a COMMAND INFO/COMMAND response.
command_list_response
Build a COMMAND LIST response.
supported_command_count
Returns the number of supported command names.