# Struct command::object::Embed

> An embed. Every text is optional, but an embed shows something: a title, a description, an author, a footer, a picture or a field (`color`, `timestamp` and `url` alone do not count

`zaun_community_protocol::command::object::Embed` · Struct

```rust
pub struct Embed { … }
```

An embed. Every text is optional, but an embed shows something: a title, a
description, an author, a footer, a picture or a field (`color`, `timestamp` and `url`
alone do not count).

## Fields

### `title: Option<String>`

1–256 scalars.

### `description: Option<String>`

1–4 096 scalars.

### `url: Option<String>`

The title's link: `https://` only, ≤ 2 048 bytes, no whitespace or control
characters. Needs a `title`.

### `color: Option<u32>`

`0x000000`–`0xFFFFFF`.

### `timestamp: Option<u64>`

A time the embed shows, ms since the epoch (< 2^53).

### `author: Option<EmbedAuthor>`

The author line.

### `footer: Option<EmbedFooter>`

The footer line.

### `image: Option<AttachmentId>`

The large picture: one of the message's attachments.

### `thumbnail: Option<AttachmentId>`

The small picture: one of the message's attachments.

### `fields: Vec<EmbedField>`

Up to 25 fields, in order.

## Methods

### `attachments`

```rust
pub fn attachments(&self) -> impl Iterator<Item = (&'static str, AttachmentId)> + '_
```

The attachments this embed shows, with the field that names each: `embeds.image`,
`embeds.thumbnail`, `embeds.author.icon`, `embeds.footer.icon`.

### `is_empty`

```rust
pub fn is_empty(&self) -> bool
```

Whether the embed shows nothing but a colour, a time or a bare link.

## Trait implementations

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

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