pub struct AttachmentBuilder { /* private fields */ }
Expand description

AttachmentBuilder is used to build a Attachment

Implementations

Make a new AttachmentBuilder

Fallback is the only required field which is a plain-text summary of the attachment.

Optional text that appears within the attachment

Set the color of the attachment

The color can be one of:

  1. Strings: good, warning, danger
  2. The built-in enums: SlackColor::Good, etc.
  3. Any valid hex color code: e.g. #b13d41 or #000.

hex color codes will be checked to ensure a valid hex number is provided

Optional text that appears above the attachment block

Actions are defined as an array, and hashes contained within it will be displayed in a table inside the message attachment.

Fields are defined as an array, and hashes contained within it will be displayed in a table inside the message attachment.

Optional small text used to display the author’s name.

Optional URL that will hyperlink the author_name.

Optional URL that displays a small 16x16px image to the left of the author_name text.

Optional larger, bolder text above the main body

Optional larger, bolder text above the main body

Optional URL to link to from the title

Optional URL to an image that will be displayed in the body

Optional URL to an image that will be displayed as a thumbnail to the right of the body

Optional text that will appear at the bottom of the attachment

Optional URL to an image that will be displayed at the bottom of the attachment

Optional timestamp to be displayed with the attachment

Optional sections formatted as markdown.

Attempt to build the Attachment

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.