Struct slack_hook::AttachmentBuilder[][src]

pub struct AttachmentBuilder { /* fields omitted */ }

AttachmentBuilder is used to build a Attachment

Methods

impl AttachmentBuilder
[src]

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

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 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

impl Debug for AttachmentBuilder
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations