[−][src]Struct block_kit::payload::chat::ChatPostMessagePayload
Reference. https://api.slack.com/messaging/sending#publishing_your_message https://api.slack.com/methods/chat.postMessage
chat.postMessage api's payload.
channel
and payload
are required to be perform as expected.
Outmoded approaches are not supported; https://api.slack.com/docs/message-formatting https://api.slack.com/docs/message-attachments
Methods
impl ChatPostMessagePayload
[src]
pub fn new(channel: impl Into<String>, payload: CommonMessagePayload) -> Self
[src]
Use this to generate instance.
pub fn as_user(self, as_user: bool) -> Self
[src]
pub fn icon_emoji(self, icon_emoji: impl Into<String>) -> Self
[src]
emoji
has higher priority than url.
This means, if both of emoji and url are set, emoji will display.
Must be used in conjunction with as_user
set to false, otherwise ignored.
pub fn icon_url(self, icon_url: impl Into<String>) -> Self
[src]
url
has lower priority than url.
This means, if both of emoji and url are set, url won't display.
Must be used in conjunction with as_user
set to false, otherwise ignored.
pub fn username(self, username: impl Into<String>) -> Self
[src]
Bot's username.
Must be used in conjunction with as_user
set to false, otherwise ignored.
pub fn reply_broadcast(self, reply_broadcast: bool) -> Self
[src]
Trait Implementations
impl Debug for ChatPostMessagePayload
[src]
impl Serialize for ChatPostMessagePayload
[src]
Auto Trait Implementations
impl RefUnwindSafe for ChatPostMessagePayload
impl Send for ChatPostMessagePayload
impl Sync for ChatPostMessagePayload
impl Unpin for ChatPostMessagePayload
impl UnwindSafe for ChatPostMessagePayload
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,