[−][src]Struct discord_game_sdk::Activity
Activity (also known as Rich Presence)
https://discordapp.com/developers/docs/game-sdk/activities#data-models-activity-struct
Methods
impl Activity
[src]
pub fn empty() -> Self
[src]
Create a new Activity with empty fields
pub fn is_empty(&self) -> bool
[src]
Check if an Activity is completely blank and should be ignored
pub fn kind(&self) -> ActivityKind
[src]
pub fn application_id(&self) -> i64
[src]
pub fn name(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn state(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn details(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn start_time(&self) -> DateTime<Utc>
[src]
pub fn end_time(&self) -> DateTime<Utc>
[src]
pub fn large_image_key(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn large_image_tooltip(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn small_image_key(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn small_image_tooltip(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn party_id(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn party_amount(&self) -> i32
[src]
pub fn party_capacity(&self) -> i32
[src]
pub fn instance(&self) -> bool
[src]
pub fn match_secret(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn join_secret(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn spectate_secret(&self) -> &str
[src]
Cost
String length is calculated every call
pub fn with_state(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_details(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_start_time(&mut self, value: DateTime<Utc>) -> &mut Self
[src]
pub fn with_end_time(&mut self, value: DateTime<Utc>) -> &mut Self
[src]
pub fn with_large_image_key(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_large_image_tooltip(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_small_image_key(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_small_image_tooltip(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_party_id(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_party_amount(&mut self, value: i32) -> &mut Self
[src]
pub fn with_party_capacity(&mut self, value: i32) -> &mut Self
[src]
pub fn with_instance(&mut self, value: bool) -> &mut Self
[src]
pub fn with_match_secret(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_join_secret(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
pub fn with_spectate_secret(&mut self, value: impl AsRef<CStr>) -> &mut Self
[src]
Trait Implementations
impl Copy for Activity
[src]
impl Clone for Activity
[src]
fn clone(&self) -> Activity
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Activity> for Activity
[src]
impl From<DiscordActivity> for Activity
[src]
fn from(original: DiscordActivity) -> Activity
[src]
impl From<Activity> for DiscordActivity
[src]
fn from(original: Activity) -> DiscordActivity
[src]
impl Eq for Activity
[src]
impl Debug for Activity
[src]
Auto Trait Implementations
impl Sync for Activity
impl Unpin for Activity
impl Send for Activity
impl UnwindSafe for Activity
impl RefUnwindSafe for Activity
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,