# Struct command::object::Attachment

> An attachment record: what a message carries, and what `attachment.download` and `attachment.updated` answer.

`zaun_community_protocol::command::object::Attachment` · Struct

```rust
pub struct Attachment { … }
```

An attachment record: what a message carries, and what `attachment.download`
and `attachment.updated` answer.

## Fields

### `attachment_id: AttachmentId`

Host-assigned id.

### `name: String`

File name.

### `size: u64`

Size in bytes.

### `mime: String`

MIME type.

### `sha3_256: Vec<u8>`

`SHA3-256` of the bytes, base64url.

### `availability: Availability`

Whether the host still holds the bytes.

### `failure: Option<UploadFailure>`

Why an upload never became `stored`; only with `availability: failed`.

## Trait implementations

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

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