Skip to main content

Core Types

Generated from the actual Rust signatures and rustdoc comments. Builders validate on build(); into_builder() preserves omissions. Error categories and paths are stable; prose may improve.

AlertLevel​

Severity levels supported by alert blocks.

ConstantWire value or payload typeMeaning
DefaultdefaultNeutral styling.
InfoinfoInformational styling.
WarningwarningWarning styling.
ErrorerrorError styling.
SuccesssuccessSuccess styling.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

Block​

A validated Slack layout block accepted directly by a JSON transport.

ConstantWire value or payload typeMeaning
Actions(Box < ActionsBlock >)A block that holds interactive elements such as buttons and menus.
Alert(Box < AlertBlock >)A severity-labelled alert, available in modals.
Card(Box < CardBlock >)A compact card with an image, text, and up to three buttons.
Carousel(Box < CarouselBlock >)A horizontally scrolling set of cards, available in messages and App Home.
Container(Box < ContainerBlock >)A titled group of blocks that can optionally collapse.
ContextActions(Box < ContextActionsBlock >)A row of feedback or icon buttons, usually shown below AI-generated content.
Context(Box < ContextBlock >)A block of small, secondary images and text.
DataTable(Box < DataTableBlock >)A sortable, paginated table of raw text, numbers, and rich text.
DataVisualization(Box < DataVisualizationBlock >)A titled pie, bar, area, or line chart.
Divider(Box < DividerBlock >)A horizontal rule that separates blocks.
File(Box < FileBlock >)A remote file previously added with the files.remote API.
Header(Box < HeaderBlock >)Large, bold plain text that introduces a group of blocks.
Image(Box < ImageBlock >)A standalone image with alternative text and an optional title.
Input(Box < InputBlock >)A labelled input that collects a value in a modal, App Home, or message.
Markdown(Box < MarkdownBlock >)Standard markdown rendered by Slack, intended for AI-generated content.
Plan(Box < PlanBlock >)A titled sequence of task cards.
RichText(Box < RichTextBlock >)Formatted text built from sections, lists, preformatted blocks, and quotes.
Section(Box < SectionBlock >)Text, a grid of fields, or both, with an optional accessory element.
Table(Box < TableBlock >)A simple table of raw text and rich text cells.
TaskCard(Box < TaskCardBlock >)One task with its status, details, output, and sources.
Video(Box < VideoBlock >)An embedded video player.

ButtonStyle​

Visual emphasis for buttons and confirmation dialogs.

ConstantWire value or payload typeMeaning
PrimaryprimaryGreen emphasis for the affirmative action.
DangerdangerRed emphasis for destructive actions.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

Chart​

A chart that can be displayed by a data visualization block.

ConstantWire value or payload typeMeaning
Area(AreaChart)An area chart for a data visualization block.
Bar(BarChart)A bar chart for a data visualization block.
Line(LineChart)A line chart for a data visualization block.
Pie(PieChart)A pie chart for a data visualization block.

ColumnAlign​

Horizontal alignment for table columns.

ConstantWire value or payload typeMeaning
LeftleftAlign cell content to the left.
CentercenterCenter cell content.
RightrightAlign cell content to the right.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

ContainerWidth​

Widths supported by Slack container blocks.

ConstantWire value or payload typeMeaning
NarrownarrowA compact container.
StandardstandardSlack's standard container width.
WidewideA wide container.
FullfullThe full available width.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

ContextActionsElement​

A value that can appear in a context actions block: feedback buttons or an icon button.

ConstantWire value or payload typeMeaning
FeedbackButtons(Box < FeedbackButtonsElement >)A pair of thumbs-up and thumbs-down feedback buttons.
IconButton(Box < IconButtonElement >)A button that shows an icon instead of text.

ContextElement​

A value that can appear in a context block: an image element or a text object.

ConstantWire value or payload typeMeaning
ImageElement(ImageElement)An image displayed inside a section, context, or card.
MarkdownText(MarkdownText)A mrkdwn text composition object.
PlainText(PlainText)A plain-text composition object.

DataTableCell​

A value that can appear as a data table cell: raw text, a raw number, or a rich text block.

ConstantWire value or payload typeMeaning
RichText(RichTextBlock)Formatted text built from sections, lists, preformatted blocks, and quotes.
RawNumber(RawNumber)A numeric data table cell with display text.
RawText(RawText)An unformatted table cell.

Element​

A validated interactive, visual, or input element nested inside a Slack block.

ConstantWire value or payload typeMeaning
Button(Box < ButtonElement >)An interactive button that sends a payload or opens a URL.
ChannelMultiSelect(Box < ChannelMultiSelectElement >)A menu for selecting multiple public channels.
ChannelSelect(Box < ChannelSelectElement >)A menu for selecting one public channel.
Checkboxes(Box < CheckboxesElement >)A group of checkboxes.
ConversationMultiSelect(Box < ConversationMultiSelectElement >)A menu for selecting multiple conversations.
ConversationSelect(Box < ConversationSelectElement >)A menu for selecting one conversation.
DatePicker(Box < DatePickerElement >)A calendar date picker.
DateTimePicker(Box < DateTimePickerElement >)A combined date and time picker.
EmailInput(Box < EmailInputElement >)A single-line input that accepts an email address.
ExternalMultiSelect(Box < ExternalMultiSelectElement >)A menu for selecting multiple options loaded from your app.
ExternalSelect(Box < ExternalSelectElement >)A menu for selecting one option loaded from your app.
FeedbackButtons(Box < FeedbackButtonsElement >)A pair of thumbs-up and thumbs-down feedback buttons.
FileInput(Box < FileInputElement >)An input that lets users upload files.
IconButton(Box < IconButtonElement >)A button that shows an icon instead of text.
Image(Box < ImageElement >)An image displayed inside a section, context, or card.
NumberInput(Box < NumberInputElement >)An input that accepts whole or decimal numbers.
Overflow(Box < OverflowElement >)A compact menu of up to five options.
PlainTextInput(Box < PlainTextInputElement >)A single-line or multi-line free-text input.
RadioButtons(Box < RadioButtonsElement >)A group of radio buttons.
RichTextInput(Box < RichTextInputElement >)An input that accepts formatted rich text.
StaticMultiSelect(Box < StaticMultiSelectElement >)A menu for selecting multiple options defined in the payload.
StaticSelect(Box < StaticSelectElement >)A menu for selecting one option defined in the payload.
TimePicker(Box < TimePickerElement >)A time-of-day picker.
UrlInput(Box < UrlInputElement >)A single-line input that accepts a URL.
UserMultiSelect(Box < UserMultiSelectElement >)A menu for selecting multiple workspace users.
UserSelect(Box < UserSelectElement >)A menu for selecting one workspace user.
WorkflowButton(Box < WorkflowButtonElement >)A button that starts a workflow through a link trigger.

IconButtonIcon​

Icons supported by icon buttons.

ConstantWire value or payload typeMeaning
TrashtrashA trash can, for delete actions.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

InputElement​

An element that can be placed in an input block.

ConstantWire value or payload typeMeaning
ChannelMultiSelect(Box < ChannelMultiSelectElement >)A menu for selecting multiple public channels.
ChannelSelect(Box < ChannelSelectElement >)A menu for selecting one public channel.
Checkboxes(Box < CheckboxesElement >)A group of checkboxes.
ConversationMultiSelect(Box < ConversationMultiSelectElement >)A menu for selecting multiple conversations.
ConversationSelect(Box < ConversationSelectElement >)A menu for selecting one conversation.
DatePicker(Box < DatePickerElement >)A calendar date picker.
DateTimePicker(Box < DateTimePickerElement >)A combined date and time picker.
EmailInput(Box < EmailInputElement >)A single-line input that accepts an email address.
ExternalMultiSelect(Box < ExternalMultiSelectElement >)A menu for selecting multiple options loaded from your app.
ExternalSelect(Box < ExternalSelectElement >)A menu for selecting one option loaded from your app.
FileInput(Box < FileInputElement >)An input that lets users upload files.
NumberInput(Box < NumberInputElement >)An input that accepts whole or decimal numbers.
PlainTextInput(Box < PlainTextInputElement >)A single-line or multi-line free-text input.
RadioButtons(Box < RadioButtonsElement >)A group of radio buttons.
RichTextInput(Box < RichTextInputElement >)An input that accepts formatted rich text.
StaticMultiSelect(Box < StaticMultiSelectElement >)A menu for selecting multiple options defined in the payload.
StaticSelect(Box < StaticSelectElement >)A menu for selecting one option defined in the payload.
TimePicker(Box < TimePickerElement >)A time-of-day picker.
UrlInput(Box < UrlInputElement >)A single-line input that accepts a URL.
UserMultiSelect(Box < UserMultiSelectElement >)A menu for selecting multiple workspace users.
UserSelect(Box < UserSelectElement >)A menu for selecting one workspace user.

JsonNumber​

A JSON integer, unsigned integer, or finite floating-point number.

Integers retain their precision through i64::MIN..=u64::MAX. Arbitrary precision values that cannot round-trip through the supported representation are rejected, including when a consumer enables serde_json's optional features.

as_number​

Borrows the validated Serde JSON number.

fn as_number(&self) -> &Number

PlainTextInput​

A plain-text builder argument: either an owned string or validated plain text.

ResponseType​

Visibility of a slash-command or interaction response.

ConstantWire value or payload typeMeaning
InChannelin_channelVisible to everyone in the channel.
EphemeralephemeralVisible only to the user who triggered the response.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

RichTextBlockElement​

A top-level element of a rich text block: a section, list, preformatted block, or quote.

ConstantWire value or payload typeMeaning
CodeBlock(RichTextCodeBlock)A preformatted code block inside rich text.
List(RichTextList)A bulleted or numbered list inside rich text.
Quote(RichTextQuote)A quotation inside rich text.
Section(RichTextSection)A paragraph of inline rich text elements.

RichTextListStyle​

Marker styles for rich text lists.

ConstantWire value or payload typeMeaning
BulletbulletAn unordered, bulleted list.
OrderedorderedA numbered list.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

RichTextSectionElement​

An inline rich text element: text, a link, an emoji, or a channel, user, or user group mention.

ConstantWire value or payload typeMeaning
Channel(RichTextChannel)A channel mention inside rich text.
Emoji(RichTextEmoji)An emoji inside rich text.
Link(RichTextLink)A hyperlink inside rich text.
Text(RichTextText)A run of optionally styled text inside rich text.
User(RichTextUser)A user mention inside rich text.
UserGroup(RichTextUserGroup)A user group mention inside rich text.

RichTextStyle​

Optional rich-text style flags. Each receiving element validates its allowed subset.

new​

Starts an empty style, with every flag omitted.

fn new() -> Self

bold​

Sets the bold flag, retaining explicit false.

fn bold(mut self, value: bool) -> Self

is_bold​

Returns the supplied bold flag.

fn is_bold(&self) -> Option<bool>

client_highlight​

Sets the client_highlight flag, retaining explicit false.

fn client_highlight(mut self, value: bool) -> Self

is_client_highlight​

Returns the supplied client_highlight flag.

fn is_client_highlight(&self) -> Option<bool>

code​

Sets the code flag, retaining explicit false.

fn code(mut self, value: bool) -> Self

is_code​

Returns the supplied code flag.

fn is_code(&self) -> Option<bool>

highlight​

Sets the highlight flag, retaining explicit false.

fn highlight(mut self, value: bool) -> Self

is_highlight​

Returns the supplied highlight flag.

fn is_highlight(&self) -> Option<bool>

italic​

Sets the italic flag, retaining explicit false.

fn italic(mut self, value: bool) -> Self

is_italic​

Returns the supplied italic flag.

fn is_italic(&self) -> Option<bool>

strike​

Sets the strike flag, retaining explicit false.

fn strike(mut self, value: bool) -> Self

is_strike​

Returns the supplied strike flag.

fn is_strike(&self) -> Option<bool>

Sets the unlink flag, retaining explicit false.

fn unlink(mut self, value: bool) -> Self

Returns the supplied unlink flag.

fn is_unlink(&self) -> Option<bool>

SPEC_VERSION​

Version of the shared Slack Block Kit contract.

TableCell​

A value that can appear as a table block cell: raw text or a rich text block.

ConstantWire value or payload typeMeaning
RichText(RichTextBlock)Formatted text built from sections, lists, preformatted blocks, and quotes.
RawText(RawText)An unformatted table cell.

TaskStatus​

States supported by task card blocks.

ConstantWire value or payload typeMeaning
PendingpendingThe task has not started.
InProgressin_progressThe task is running.
CompletecompleteThe task finished successfully.
ErrorerrorThe task failed.

as_str​

Returns the Slack wire spelling.

const fn as_str(self) -> &'static str

Text​

A Slack text composition object: plain text or mrkdwn.

ConstantWire value or payload typeMeaning
Markdown(MarkdownText)A mrkdwn text composition object.
Plain(PlainText)A plain-text composition object.

TextInput​

A text builder argument. Strings use the receiving field's documented text kind. There is deliberately no global string-to-Text conversion.

VERSION​

The Cargo package version; independent of the shared specification version.