Added documentation for Payload

This commit is contained in:
DylanCa 2024-01-13 12:37:25 +01:00
parent 6a7f47b6a6
commit 35472c0334

View file

@ -1,11 +1,13 @@
use crate::models::client::event::{EventData, EventName}; use crate::models::client::event::{EventData, EventName};
use serde::Serialize; use serde::Serialize;
/// List of OpCode to send to Discord App through IPC.
pub enum OpCode { pub enum OpCode {
HANDSHAKE, HANDSHAKE,
MESSAGE, MESSAGE,
} }
/// Payload object used to encapsulate data to send to Discord Client.
#[derive(Serialize, Debug)] #[derive(Serialize, Debug)]
pub struct Payload { pub struct Payload {
pub event_name: String, pub event_name: String,