rpc_discord/
lib.rs

1mod rpc;
2pub mod utils;
3
4pub mod errors;
5pub mod models;
6pub mod opcodes;
7
8mod ipc;
9mod ipc_socket;
10
11use serde::{Deserialize, Serialize};
12
13use errors::DiscordRPCError;
14pub use ipc::DiscordIpcClient;
15use models::{commands::BasedCommandReturn, events::BasedEvent};
16pub use utils::*;
17
18pub type Result<T, E = DiscordRPCError> = std::result::Result<T, E>;
19
20/// Currently this is used to allow for matching of an event or type
21/// Not all events/commands are implemented so serializing can fail
22#[derive(Serialize, Deserialize, Debug)]
23#[serde(untagged)]
24pub enum EventReceive {
25  Event(BasedEvent),
26  CommandReturn(BasedCommandReturn),
27}