Struct slack_hook3::AttachmentBuilder [−][src]
pub struct AttachmentBuilder { /* fields omitted */ }
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:
String
s:good
,warning
,danger
- The built-in enums:
SlackColor::Good
, etc. - 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
pub fn markdown_in<'a, I: IntoIterator<Item = &'a Section>>(
self,
sections: I
) -> AttachmentBuilder
pub fn markdown_in<'a, I: IntoIterator<Item = &'a Section>>(
self,
sections: I
) -> AttachmentBuilder
Optional sections formatted as markdown.
Attempt to build the Attachment
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AttachmentBuilder
impl Send for AttachmentBuilder
impl Sync for AttachmentBuilder
impl Unpin for AttachmentBuilder
impl UnwindSafe for AttachmentBuilder