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§
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
impl Eq for Activity
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