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§
- BitField
Encoding - Integer encoding used by BITFIELD subcommands.
Enums§
- BitField
Offset - Offset format used by BITFIELD subcommands.
- BitField
Operation - A parsed BITFIELD subcommand.
- BitField
Overflow - Overflow behavior for BITFIELD mutation operations.
- BitOperation
- Bitwise operation for BITOP command.
- Command
- A parsed command ready for execution by a shard.
- Command
Response - Response from executing a command on a shard.
- DocUpdate
Mutation - One
DOC.UPDATEmutation operation. - GeoUnit
- Distance unit for geo commands.
Constants§
- COMMAND_
HELP_ LINES - Human-readable help text for the
COMMAND HELPreply. - SUPPORTED_
COMMAND_ NAMES - Canonical supported command names exposed by
COMMAND LIST.
Functions§
- command_
docs_ response - Build a
COMMAND DOCSresponse. - command_
help_ response - Build a
COMMAND HELPresponse. - command_
info_ response - Build a
COMMAND INFO/COMMANDresponse. - command_
list_ response - Build a
COMMAND LISTresponse. - supported_
command_ count - Returns the number of supported command names.