Struct slack_hook::PayloadBuilder
source · pub struct PayloadBuilder { /* private fields */ }
Expand description
PayloadBuilder
is used to build a Payload
Implementations
sourceimpl 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
sourceimpl Debug for PayloadBuilder
impl Debug for PayloadBuilder
sourceimpl Default for PayloadBuilder
impl Default for PayloadBuilder
sourcefn default() -> PayloadBuilder
fn default() -> PayloadBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PayloadBuilder
impl Send for PayloadBuilder
impl !Sync for PayloadBuilder
impl Unpin for PayloadBuilder
impl !UnwindSafe for PayloadBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more