# Struct EditMessage

> An edit of one of this member's messages. A plain `&str` replaces the text and leaves the embeds and mentions as they are.

`zaun_client::EditMessage` · Struct

```rust
pub struct EditMessage { … }
```

An edit of one of this member's messages. A plain `&str` replaces the text and leaves the
embeds and mentions as they are.

An edit uploads nothing: an embed's pictures must be attachments the message already has
(`Picture::Attachment`, or an `Attachment` of it).

## Methods

### `mention_member`

```rust
pub fn mention_member(self, member: MemberId) -> Self
```

Notifies `member`, as `MessageOptions::mention_member`.
Any mention on an edit replaces all of the message's mentions, and needs
`SEND_MESSAGES`.

### `mention_role`

```rust
pub fn mention_role(self, role: RoleId) -> Self
```

Notifies the members with `role`, as
`MessageOptions::mention_role`.

### `mention_everyone`

```rust
pub fn mention_everyone(self) -> Self
```

Notifies everyone who can see the channel (needs `MENTION_EVERYONE`; dropped without).

### `mentions`

```rust
pub fn mentions(self, mentions: Mentions) -> Self
```

Replaces the message's mentions with exactly `mentions`; `Mentions::default` clears
them, `@everyone` too.

### `mentions_from_content`

```rust
pub const fn mentions_from_content(self) -> Self
```

Also notifies whoever the text shows (see `mention::parse`): the new text, or the
message's own when the edit keeps it. The edit then always sends mentions, so text
that shows none clears them. Only for text this member wrote.

### `new`

```rust
pub fn new() -> Self
```

An edit that changes nothing yet: the text stays (a `Message` knows
it; a `PartialMessage` needs `content`), and
so do the embeds.

### `content`

```rust
pub fn content<impl Into<String>>(self, content: impl Into<String>) -> Self
```

The new text.

### `embed`

```rust
pub fn embed<impl Into<EmbedBuilder>>(self, embed: impl Into<EmbedBuilder>) -> Self
```

Replaces the embeds with these, starting with this one.

### `embeds`

```rust
pub fn embeds<impl Into<EmbedBuilder>, impl IntoIterator<Item = impl Into<EmbedBuilder>>>(self, embeds: impl IntoIterator<Item = impl Into<EmbedBuilder>>) -> Self
```

Replaces the embeds with `embeds` (none removes them all).

### `clear_embeds`

```rust
pub fn clear_embeds(self) -> Self
```

Removes every embed.

## Trait implementations

`Clone`, `Debug`, `Default`, `Eq`, `From<&String>`, `From<&str>`, `From<EmbedBuilder>`, `From<String>`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/compose/options/struct.EditMessage.html)
