pub struct Activity {
pub name: String,
pub kind: ActivityType,
pub url: String,
pub timestamps: Option<ActivityTimestamps>,
pub application_id: Option<Snowflake>,
pub details: Option<String>,
pub state: Option<String>,
pub party: Option<ActivityParty>,
pub assets: Option<ActivityAssets>,
pub secrets: Option<ActivitySecrets>,
pub instance: Option<bool>,
pub flags: Option<i32>,
}Expand description
Data about an activity that the user is participating in.
Fields§
§name: StringThe name of the activity.
kind: ActivityTypeThe type of activity.
url: StringIf type is 1, the stream URL.
timestamps: Option<ActivityTimestamps>Timestamps for this activity.
application_id: Option<Snowflake>The application ID for the game, if any.
details: Option<String>What the player is currently doing.
state: Option<String>The user’s current party status.
party: Option<ActivityParty>The player’s current party.
assets: Option<ActivityAssets>The Rich Presence assets.
secrets: Option<ActivitySecrets>The Rich Presence secrets.
instance: Option<bool>Whether or not the activity is in a current game session.
flags: Option<i32>Activity flags.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnwindSafe for Activity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more