rpc-discord 0.0.1-alpha.5

Cross-platform crate for interfacing with the Discord client locally via RPC
Documentation
mod rpc;
pub mod utils;

pub mod errors;
pub mod models;
pub mod opcodes;

mod ipc;
mod ipc_socket;

use serde::{Deserialize, Serialize};

use errors::DiscordRPCError;
pub use ipc::DiscordIpcClient;
use models::{commands::BasedCommandReturn, events::BasedEvent};
pub use utils::*;

pub type Result<T, E = DiscordRPCError> = std::result::Result<T, E>;

/// Currently this is used to allow for matching of an event or type
/// Not all events/commands are implemented so serializing can fail
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum EventReceive {
  Event(BasedEvent),
  CommandReturn(BasedCommandReturn),
}