Struct slack_hook::Attachment [] [src]

pub struct Attachment {
    pub fallback: SlackText,
    pub text: Option<SlackText>,
    pub pretext: Option<SlackText>,
    pub color: HexColor,
    pub fields: Option<Vec<Field>>,
}

Slack allows for attachments to be added to messages. See https://api.slack.com/docs/attachments for more information.

Fields

fallback: SlackText

Required text for attachment. Slack will use this text to display on devices that don't support markup.

text: Option<SlackText>

Optional text for other devices, markup supported

pretext: Option<SlackText>

Optional text that appears above attachment

color: HexColor

Color of attachment

fields: Option<Vec<Field>>

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

Methods

impl Attachment
[src]

fn new(t: AttachmentTemplate) -> SlackResult<Attachment>

Construct new attachment based on template provided

Trait Implementations

impl Debug for Attachment
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Encodable for Attachment
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>