# Struct command::object::Activity

> An activity.

`zaun_community_protocol::command::object::Activity` · Struct

```rust
pub struct Activity { … }
```

An activity.

## Fields

### `kind: ActivityType`

The kind.

### `name: String`

1–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 the protocol 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.

## Methods

### `check`

```rust
pub fn check(&self) -> Result<(), BodyError>
```

The state-free rules.

# Errors
The first violated rule, with the field named `activity.<field>`.

## Trait implementations

`Clone`, `Debug`, `Deserialize<'de>`, `Eq`, `PartialEq`, `Serialize`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/command/object/presence/struct.Activity.html)
