Enum slack_hook::AttachmentTemplate
[−]
[src]
pub enum AttachmentTemplate<'a> { Complete { fallback: &'a str, text: Option<&'a str>, pretext: Option<&'a str>, color: &'a str, fields: Option<Vec<Field>>, }, Text { text: &'a str, color: &'a str, }, }
Attachment template to simplify constructing attachments for common use cases.
Variants
Complete
Specify all attributes of attachment
Fields
fallback: &'a str | Required text for attachment. Slack will use this text to display on devices that don't support markup. |
text: Option<&'a str> | Optional primary text of attachment |
pretext: Option<&'a str> | Optional text that appears above attachment |
color: &'a str | Color string can be any hex code starting with # |
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. |
Text
Provide only text and color for attachment other values will be defaulted
Fields
text: &'a str | Text to send |
color: &'a str | Color string can be any hex code starting with # |