Struct command::object::Activity
zaun_community_protocol::command::object::Activity · Struct
pub struct Activity { … }An activity.
Fields
Section titled “Fields”kind: ActivityType
Section titled “kind: ActivityType”The kind.
name: String
Section titled “name: String”1–128 scalars: the game, song, show, …
details: Option<String>
Section titled “details: Option<String>”≤ 128 scalars: e.g. the track or the level.
state: Option<String>
Section titled “state: Option<String>”≤ 128 scalars: e.g. the artist or the party size.
url: Option<String>
Section titled “url: Option<String>”streaming only: where to watch (https://, the the protocol link rules; opened only
after the reader confirms).
started_at: Option<u64>
Section titled “started_at: Option<u64>”When it started, ms since the epoch.
emoji: Option<String>
Section titled “emoji: Option<String>”custom only: a Unicode emoji.
Methods
Section titled “Methods”pub fn check(&self) -> Result<(), BodyError>The state-free rules.
Errors
Section titled “Errors”The first violated rule, with the field named activity.<field>.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq