[−][src]Crate discord_game_sdk
Safe wrapper for the Discord Game SDK
This crate provides Rust support to the following Discord features:
- Activities (Rich Presence)
- Users, Avatars and Relationships
- Lobbies, Matchmaking and Voice communication
- Faux-P2P Networking
- Cloud Synchronized (or not) Storage
- Store transactions
- Achievements
- ...
Status
This library is currently in early stages but is stabilizing. I'm not aware of any good ways to test this crate, there are currently no tests.
Safety
This crate relies on the SDK to provide correct data and behavior:
- Non-null pointers to valid memory
- UTF-8, NUL-terminated strings
- Valid enum values
- No mutation of memory it should have no ownership of
- No use of pointers after
destroy
is called
"Legal" note
This wrapper was informally allowed for publication and distribution by Discord Staff. I cannot redistribute the SDK files until it is made open-source or is licensed for redistribution. You will have to follow some instructions when first setting up your project. Apologies for the inconvenience.
If you're a part of Discord and wish to discuss this, please
email ldesgoui@gmail.com
or contact twiikuu#0047
. I mean no harm.
Modules
event | Event Types |
Structs
Achievement | User Achievement |
Activity | Activity (also known as Rich Presence) |
Discord | Main interface with SDK |
Entitlement | Proof that user has made a purchase |
FileStat | File Metadata |
Image | Image with pixel data |
ImageHandle | Image Handle |
InputMode | Input Mode |
Lobby | Lobby |
LobbyMemberTransaction | Lobby Member Transaction |
LobbyTransaction | Lobby Transaction |
OAuth2Token | OAuth2 Token |
Presence | User Presence |
Relationship | Relationship |
SearchQuery | Lobby Search |
Sku | SKU (stock keeping unit) |
User | User |
UserFlags | User Flags |
Enums
Action | Action to take when invited or inviting to an |
ActivityKind | Activity Type |
Cast | Lobby Search Cast |
Comparison | Lobby Search Comparison |
CreateFlags | Discord Creation Flags |
Distance | Lobby Search Max Distance |
EntitlementKind | Entitlement Type |
Error | Discord Error |
FetchKind | Image Fetch Option |
ImageKind | Image Type |
InputModeKind | Input Mode Type |
LobbyKind | Lobby Type |
PremiumKind | Premium Type |
RelationshipKind | Relationship Type |
Reliability | Network Channel Reliability |
RequestReply | Activity Join Request Reply |
SkuKind | SKU Type |
Status | User Status |
Type Definitions
Result |