# Enum Picture

> Where an embed's picture (or a message's file) comes from. Pictures are never remote URLs: a file is uploaded as one of the message's attachments, so no reader's client ever fetche

`zaun_client::Picture` · Enum

```rust
pub enum Picture { … }
```

Where an embed's picture (or a message's file) comes from. Pictures are never remote
URLs: a file is uploaded as one of the message's attachments, so no reader's client ever
fetches anything from a third party.

## Variants

### `File(PathBuf)`

A local file, uploaded under its own name.

### `Bytes { name, data }`

Bytes, uploaded under `name` (whose extension gives the media type).

### `Attachment(AttachmentId)`

An attachment this member uploaded (and has not posted yet) or, for an edit, one the
message already has.

## Methods

### `file`

```rust
pub fn file<impl Into<PathBuf>>(path: impl Into<PathBuf>) -> Self
```

The file at `path`.

### `bytes`

```rust
pub fn bytes<impl Into<String>, impl Into<Vec<u8>>>(name: impl Into<String>, data: impl Into<Vec<u8>>) -> Self
```

`data`, uploaded as a file named `name`.

### `attachment`

```rust
pub const fn attachment(id: AttachmentId) -> Self
```

The attachment `id`.

## Trait implementations

`Clone`, `Debug`, `Eq`, `From<&Attachment>`, `From<&Path>`, `From<AttachmentId>`, `From<PathBuf>`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/compose/embed/enum.Picture.html)
