Struct slack_hook::PayloadBuilder [−][src]
pub struct PayloadBuilder { /* fields omitted */ }
PayloadBuilder
is used to build a Payload
Methods
impl PayloadBuilder
[src]
impl PayloadBuilder
pub fn new() -> PayloadBuilder
[src]
pub fn new() -> PayloadBuilder
Make a new PayloadBuilder
pub fn text<S: Into<SlackText>>(self, text: S) -> PayloadBuilder
[src]
pub fn text<S: Into<SlackText>>(self, text: S) -> PayloadBuilder
Set the text
pub fn channel<S: Into<String>>(self, channel: S) -> PayloadBuilder
[src]
pub fn channel<S: Into<String>>(self, channel: S) -> PayloadBuilder
Set the channel
pub fn username<S: Into<String>>(self, username: S) -> PayloadBuilder
[src]
pub fn username<S: Into<String>>(self, username: S) -> PayloadBuilder
Set the username
pub fn icon_emoji<S: Into<String>>(self, icon_emoji: S) -> PayloadBuilder
[src]
pub fn icon_emoji<S: Into<String>>(self, icon_emoji: S) -> PayloadBuilder
Set the icon_emoji
pub fn icon_url<U: TryInto<Url, Err = Error>>(
self,
icon_url: U
) -> PayloadBuilder
[src]
pub fn icon_url<U: TryInto<Url, Err = Error>>(
self,
icon_url: U
) -> PayloadBuilder
Set the icon_url
pub fn attachments(self, attachments: Vec<Attachment>) -> PayloadBuilder
[src]
pub fn attachments(self, attachments: Vec<Attachment>) -> PayloadBuilder
Set the attachments
pub fn unfurl_links(self, b: bool) -> PayloadBuilder
[src]
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
pub fn unfurl_media(self, b: bool) -> PayloadBuilder
[src]
pub fn unfurl_media(self, b: bool) -> PayloadBuilder
Pass false to disable unfurling of media content
pub fn link_names(self, b: bool) -> PayloadBuilder
[src]
pub fn link_names(self, b: bool) -> PayloadBuilder
Find and link channel names and usernames.
pub fn parse(self, p: Parse) -> PayloadBuilder
[src]
pub fn parse(self, p: Parse) -> PayloadBuilder
Change how messages are treated.
pub fn build(self) -> Result<Payload>
[src]
pub fn build(self) -> Result<Payload>
Attempt to build the Payload
Trait Implementations
impl Debug for PayloadBuilder
[src]
impl Debug for PayloadBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for PayloadBuilder
[src]
impl Default for PayloadBuilder
fn default() -> PayloadBuilder
[src]
fn default() -> PayloadBuilder
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for PayloadBuilder
impl Send for PayloadBuilder
impl !Sync for PayloadBuilder
impl !Sync for PayloadBuilder