Struct slack_hook2::Payload

source ·
pub struct Payload {
    pub text: Option<SlackText>,
    pub channel: Option<String>,
    pub username: Option<String>,
    pub icon_url: Option<Url>,
    pub icon_emoji: Option<String>,
    pub attachments: Option<Vec<Attachment>>,
    pub unfurl_links: Option<bool>,
    pub unfurl_media: Option<bool>,
    pub link_names: Option<u8>,
    pub parse: Option<Parse>,
}
Expand description

Payload to send to slack https://api.slack.com/incoming-webhooks https://api.slack.com/methods/chat.postMessage

Fields§

§text: Option<SlackText>

text to send despite text stated as required, it does not seem to be

§channel: Option<String>

channel to send payload to note: if not provided, this will default to channel setup in slack

§username: Option<String>

username override

§icon_url: Option<Url>

specific url for icon

§icon_emoji: Option<String>

emjoi for icon https://api.slack.com/methods/emoji.list

§attachments: Option<Vec<Attachment>>

attachments to send

§unfurl_links: Option<bool>

whether slack will try to fetch links and create an attachment https://api.slack.com/docs/unfurling

§unfurl_media: Option<bool>

Pass false to disable unfurling of media content

§link_names: Option<u8>

find and link channel names and usernames

§parse: Option<Parse>

Change how messages are treated.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more