[][src]Struct discord_game_sdk::Activity

pub struct Activity(_);

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]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_details(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

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]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_large_image_tooltip(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_small_image_key(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_small_image_tooltip(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_party_id(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

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]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_join_secret(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

pub fn with_spectate_secret(&mut self, value: impl AsRef<CStr>) -> &mut Self[src]

value must be valid UTF-8

Panics

value must be smaller than the container it is being written to

Trait Implementations

impl Copy for Activity[src]

impl Clone for 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]

impl From<Activity> for DiscordActivity[src]

impl Eq for Activity[src]

impl Debug for Activity[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]