pub trait GatewayCommand: Serialize {
const OPCODE: OpCode;
}Expand description
A payload that can be sent to the gateway.
Each command knows its opcode. Wrap a command in CommandPayload to get
the {"op": …, "d": …} envelope the gateway expects.
discord.js counterpart: GatewaySendPayload (discord-api-types).
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".