Skip to main content

SendablePacket

Trait SendablePacket 

Source
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§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§