2018-04-05 20:12:59 -04:00
|
|
|
pub mod commands;
|
|
|
|
pub mod events;
|
2022-02-03 09:52:53 -05:00
|
|
|
pub mod message;
|
|
|
|
pub mod payload;
|
2018-04-05 20:12:59 -04:00
|
|
|
pub mod rich_presence;
|
2022-02-03 09:52:53 -05:00
|
|
|
mod shared;
|
2018-04-05 20:12:59 -04:00
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
|
|
|
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
|
|
|
|
pub enum Command {
|
|
|
|
Dispatch,
|
|
|
|
Authorize,
|
|
|
|
Subscribe,
|
|
|
|
Unsubscribe,
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
SetActivity,
|
2018-04-10 09:14:48 -04:00
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
SendActivityJoinInvite,
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
CloseActivityRequest,
|
2018-04-05 20:12:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
|
|
|
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
|
|
|
|
pub enum Event {
|
|
|
|
Ready,
|
|
|
|
Error,
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
ActivityJoin,
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
ActivitySpectate,
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
ActivityJoinRequest,
|
|
|
|
}
|
2018-03-29 17:40:56 -04:00
|
|
|
|
2018-04-05 20:12:59 -04:00
|
|
|
pub use self::commands::*;
|
|
|
|
pub use self::events::*;
|
2022-02-03 09:52:53 -05:00
|
|
|
pub use self::message::{Message, OpCode};
|
2018-04-05 20:12:59 -04:00
|
|
|
|
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
pub use self::rich_presence::*;
|
2018-03-22 10:35:48 -04:00
|
|
|
|
2018-04-05 20:12:59 -04:00
|
|
|
pub mod prelude {
|
2022-02-03 09:52:53 -05:00
|
|
|
pub use super::commands::{Subscription, SubscriptionArgs};
|
|
|
|
pub use super::events::{ErrorEvent, ReadyEvent};
|
2018-04-05 20:12:59 -04:00
|
|
|
#[cfg(feature = "rich_presence")]
|
|
|
|
pub use super::rich_presence::{
|
2022-02-03 09:52:53 -05:00
|
|
|
ActivityJoinEvent, ActivityJoinRequestEvent, ActivitySpectateEvent,
|
|
|
|
CloseActivityRequestArgs, SendActivityJoinInviteArgs, SetActivityArgs,
|
2018-04-05 20:12:59 -04:00
|
|
|
};
|
2022-02-03 09:52:53 -05:00
|
|
|
pub use super::Command;
|
|
|
|
pub use super::Event;
|
2018-04-05 20:12:59 -04:00
|
|
|
}
|