Struct slack_hook_clux::PayloadBuilder
source · pub struct PayloadBuilder { /* private fields */ }
Expand description
PayloadBuilder
is used to build a Payload
Implementations§
source§impl PayloadBuilder
impl PayloadBuilder
sourcepub fn new() -> PayloadBuilder
pub fn new() -> PayloadBuilder
Make a new PayloadBuilder
sourcepub fn text<S: Into<SlackText>>(self, text: S) -> PayloadBuilder
pub fn text<S: Into<SlackText>>(self, text: S) -> PayloadBuilder
Set the text
sourcepub fn channel<S: Into<String>>(self, channel: S) -> PayloadBuilder
pub fn channel<S: Into<String>>(self, channel: S) -> PayloadBuilder
Set the channel
sourcepub fn username<S: Into<String>>(self, username: S) -> PayloadBuilder
pub fn username<S: Into<String>>(self, username: S) -> PayloadBuilder
Set the username
sourcepub fn icon_emoji<S: Into<String>>(self, icon_emoji: S) -> PayloadBuilder
pub fn icon_emoji<S: Into<String>>(self, icon_emoji: S) -> PayloadBuilder
Set the icon_emoji
sourcepub fn icon_url<U: TryInto<Url, Err = Error>>(
self,
icon_url: U
) -> PayloadBuilder
pub fn icon_url<U: TryInto<Url, Err = Error>>(
self,
icon_url: U
) -> PayloadBuilder
Set the icon_url
sourcepub fn attachments(self, attachments: Vec<Attachment>) -> PayloadBuilder
pub fn attachments(self, attachments: Vec<Attachment>) -> PayloadBuilder
Set the attachments
sourcepub fn unfurl_links(self, b: bool) -> PayloadBuilder
pub fn unfurl_links(self, b: bool) -> PayloadBuilder
whether slack will try to fetch links and create an attachment https://api.slack.com/docs/unfurling
sourcepub fn unfurl_media(self, b: bool) -> PayloadBuilder
pub fn unfurl_media(self, b: bool) -> PayloadBuilder
Pass false to disable unfurling of media content
sourcepub fn link_names(self, b: bool) -> PayloadBuilder
pub fn link_names(self, b: bool) -> PayloadBuilder
Find and link channel names and usernames.
sourcepub fn parse(self, p: Parse) -> PayloadBuilder
pub fn parse(self, p: Parse) -> PayloadBuilder
Change how messages are treated.
Trait Implementations§
source§impl Debug for PayloadBuilder
impl Debug for PayloadBuilder
source§impl Default for PayloadBuilder
impl Default for PayloadBuilder
source§fn default() -> PayloadBuilder
fn default() -> PayloadBuilder
Returns the “default value” for a type. Read more