Struct Activity
pub struct Activity {
pub kind: ActivityType,
pub name: String,
pub details: Option<String>,
pub state: Option<String>,
pub url: Option<String>,
pub started_at: Option<u64>,
pub emoji: Option<String>,
}Expand description
An activity (§10.5).
Fields§
§kind: ActivityTypeThe kind.
name: String1–128 scalars: the game, song, show, …
details: Option<String>≤ 128 scalars: e.g. the track or the level.
state: Option<String>≤ 128 scalars: e.g. the artist or the party size.
url: Option<String>streaming only: where to watch (https://, the §8.5 link rules; opened only
after the reader confirms).
started_at: Option<u64>When it started, ms since the epoch.
emoji: Option<String>custom only: a Unicode emoji.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
§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
impl Eq for Activity
§impl Serialize for Activity
impl Serialize for Activity
§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
impl StructuralPartialEq for Activity
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more