Skip to main content

Crate filthy_rich

Crate filthy_rich 

Source
Expand description

This is the API reference page for filthy-rich.

§Getting Started

Please refer to either of these two structs for implementing Rich Presence functionality in your app:

PresenceRunner - core runner for rich presence
PresenceClient - client/messenger instance used for sending activity and closing updates

Extra types are stored in the types module whereas the error enums and their variants are in the errors module respectively.

§Looking for Discord’s documentation?

The groundwork of this project has been done using the official Discord RPC documentation page. Do note that not all features are/will be implemented as most of them are not fully implemented in Discord itself on a client basis.

§Examples

Library examples can be found in this directory on GitHub.

Modules§

errors
Core error types module for filthy-rich.
types
Core types related to filthy-rich. Used in conjunction with the core imports.

Macros§

ds
Generates a function $name which returns an Option<&str> by dereferencing the $name field of a struct.
nf
Generates a function $name which takes a $param and sets the $name field of a struct to be a None-filtered String.

Structs§

PresenceClient
A client handle for communicating with super::PresenceRunner and its inner loop.
PresenceRunner
A runner that manages the Discord RPC background task. Create a runner, configure it, run it to get a client handle, then clone the handle for sharing.