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