[][src]Struct block_kit::payload::chat::ChatPostMessagePayload

pub struct ChatPostMessagePayload { /* fields omitted */ }

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.