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