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: IntoUrl>(self, icon_url: U) -> PayloadBuilder
pub fn icon_url<U: IntoUrl>(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
Auto Trait Implementations§
impl Freeze for PayloadBuilder
impl !RefUnwindSafe for PayloadBuilder
impl Send for PayloadBuilder
impl !Sync for PayloadBuilder
impl Unpin for PayloadBuilder
impl !UnwindSafe for PayloadBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more