pub trait SendablePacket {
// Required methods
fn to_json(self) -> Result<String, JsonError>;
fn bytes(self) -> Result<Vec<u8>, JsonError>;
}Expand description
Denotes structs that can be sent to the gateway.
Required Methods§
fn to_json(self) -> Result<String, JsonError>
fn bytes(self) -> Result<Vec<u8>, JsonError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".