Struct discord_flows::model::Activity
source · pub struct Activity {Show 14 fields
pub application_id: Option<ApplicationId>,
pub assets: Option<ActivityAssets>,
pub details: Option<String>,
pub flags: Option<ActivityFlags>,
pub instance: Option<bool>,
pub kind: ActivityType,
pub name: String,
pub party: Option<ActivityParty>,
pub secrets: Option<ActivitySecrets>,
pub state: Option<String>,
pub emoji: Option<ActivityEmoji>,
pub timestamps: Option<ActivityTimestamps>,
pub url: Option<Url>,
pub buttons: Vec<ActivityButton, Global>,
}Expand description
Representation of an activity that a User is performing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.application_id: Option<ApplicationId>The ID of the application for the activity.
assets: Option<ActivityAssets>Images for the presence and their texts.
details: Option<String>What the user is doing.
flags: Option<ActivityFlags>Activity flags describing what the payload includes.
instance: Option<bool>Whether or not the activity is an instanced game session.
kind: ActivityTypeThe type of activity being performed
name: StringThe name of the activity.
party: Option<ActivityParty>Information about the user’s current party.
secrets: Option<ActivitySecrets>Secrets for Rich Presence joining and spectating.
state: Option<String>The user’s current party status.
emoji: Option<ActivityEmoji>Emoji currently used in custom status
timestamps: Option<ActivityTimestamps>Unix timestamps for the start and/or end times of the activity.
url: Option<Url>The Stream URL if Self::kind is ActivityType::Streaming.
The buttons of this activity.
Note: There can only be up to 2 buttons.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Activity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Activity, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Activity
impl Serialize for Activity
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
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