Skip to main content

Blocks

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.

ActionsBlock​

A block that holds interactive elements such as buttons and menus.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> ActionsBlockBuilder

Related types: ActionsBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> ActionsBlockBuilder

Related types: ActionsBlockBuilder

elements​

Borrows or copies elements. Adds interactive elements in display order.

fn elements(&self) -> &[Element]

Related types: Element

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

ActionsBlockBuilder​

Consuming builder for ActionsBlock. Validation runs in Self::build.

elements​

Adds interactive elements in display order. Replaces the collection; order is preserved.

fn elements<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<Element>,

Related types: Element

element​

Appends one item to the collection.

fn element(mut self, value: impl Into<Element>) -> Self

Related types: Element

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<ActionsBlock, ValidationError>

Related types: ActionsBlock, ValidationError

AlertBlock​

A severity-labelled alert, available in modals.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> AlertBlockBuilder

Related types: AlertBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> AlertBlockBuilder

Related types: AlertBlockBuilder

text​

Borrows or copies text. Sets the alert message.

fn text(&self) -> &Text

Related types: Text

level​

Borrows or copies level. Sets the alert severity, which controls its color and icon.

fn level(&self) -> Option<AlertLevel>

Related types: AlertLevel

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

AlertBlockBuilder​

Consuming builder for AlertBlock. Validation runs in Self::build.

text​

Sets the alert message.

fn text(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

level​

Sets the alert severity, which controls its color and icon.

fn level(mut self, value: AlertLevel) -> Self

Related types: AlertLevel

clear_level​

Omits level, including any model default.

fn clear_level(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<AlertBlock, ValidationError>

Related types: AlertBlock, ValidationError

CardBlock​

A compact card with an image, text, and up to three buttons.

Slack reference. Provide at least one of a hero image, title, actions, or body. An image icon and a Slack icon cannot be combined.

builder​

Starts a builder with the documented model defaults.

fn builder() -> CardBlockBuilder

Related types: CardBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> CardBlockBuilder

Related types: CardBlockBuilder

hero_image​

Borrows or copies hero_image. Sets the image displayed prominently at the top of the card.

fn hero_image(&self) -> Option<&ImageElement>

Related types: ImageElement

icon​

Borrows or copies icon. Sets the image displayed beside the title.

fn icon(&self) -> Option<&ImageElement>

Related types: ImageElement

title​

Borrows or copies title. Sets the card title.

fn title(&self) -> Option<&Text>

Related types: Text

subtitle​

Borrows or copies subtitle. Sets the supporting text shown below the title.

fn subtitle(&self) -> Option<&Text>

Related types: Text

body​

Borrows or copies body. Sets the main body text of the card.

fn body(&self) -> Option<&Text>

Related types: Text

actions​

Borrows or copies actions. Adds buttons displayed at the bottom of the card, in display order.

fn actions(&self) -> Option<&[ButtonElement]>

Related types: ButtonElement

slack_icon​

Borrows or copies slack_icon. Sets a Slack-provided icon displayed beside the title. Cannot be combined with an image icon.

fn slack_icon(&self) -> Option<&SlackIcon>

Related types: SlackIcon

subtext​

Borrows or copies subtext. Sets the small print shown at the bottom of the card.

fn subtext(&self) -> Option<&Text>

Related types: Text

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

CardBlockBuilder​

Consuming builder for CardBlock. Validation runs in Self::build.

hero_image​

Sets the image displayed prominently at the top of the card.

fn hero_image(mut self, value: impl Into<ImageElement>) -> Self

Related types: ImageElement

clear_hero_image​

Omits hero_image, including any model default.

fn clear_hero_image(mut self) -> Self

icon​

Sets the image displayed beside the title.

fn icon(mut self, value: impl Into<ImageElement>) -> Self

Related types: ImageElement

clear_icon​

Omits icon, including any model default.

fn clear_icon(mut self) -> Self

title​

Sets the card title.

fn title(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_title​

Omits title, including any model default.

fn clear_title(mut self) -> Self

subtitle​

Sets the supporting text shown below the title.

fn subtitle(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_subtitle​

Omits subtitle, including any model default.

fn clear_subtitle(mut self) -> Self

body​

Sets the main body text of the card.

fn body(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_body​

Omits body, including any model default.

fn clear_body(mut self) -> Self

actions​

Adds buttons displayed at the bottom of the card, in display order. Replaces the collection; order is preserved.

fn actions<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<ButtonElement>,

Related types: ButtonElement

action​

Appends one item to the collection.

fn action(mut self, value: impl Into<ButtonElement>) -> Self

Related types: ButtonElement

clear_actions​

Omits actions, including any model default.

fn clear_actions(mut self) -> Self

slack_icon​

Sets a Slack-provided icon displayed beside the title. Cannot be combined with an image icon.

fn slack_icon(mut self, value: impl Into<SlackIcon>) -> Self

Related types: SlackIcon

clear_slack_icon​

Omits slack_icon, including any model default.

fn clear_slack_icon(mut self) -> Self

subtext​

Sets the small print shown at the bottom of the card.

fn subtext(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_subtext​

Omits subtext, including any model default.

fn clear_subtext(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<CardBlock, ValidationError>

Related types: CardBlock, ValidationError

CarouselBlock​

A horizontally scrolling set of cards, available in messages and App Home.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> CarouselBlockBuilder

Related types: CarouselBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> CarouselBlockBuilder

Related types: CarouselBlockBuilder

elements​

Borrows or copies elements. Adds the cards in display order.

fn elements(&self) -> &[CardBlock]

Related types: CardBlock

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

CarouselBlockBuilder​

Consuming builder for CarouselBlock. Validation runs in Self::build.

elements​

Adds the cards in display order. Replaces the collection; order is preserved.

fn elements<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<CardBlock>,

Related types: CardBlock

element​

Appends one item to the collection.

fn element(mut self, value: impl Into<CardBlock>) -> Self

Related types: CardBlock

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<CarouselBlock, ValidationError>

Related types: CarouselBlock, ValidationError

ContainerBlock​

A titled group of blocks that can optionally collapse.

Slack reference. Provide a title or a rich text title.

builder​

Starts a builder with the documented model defaults.

fn builder() -> ContainerBlockBuilder

Related types: ContainerBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> ContainerBlockBuilder

Related types: ContainerBlockBuilder

child_blocks​

Borrows or copies child_blocks. Adds the blocks grouped inside the container, in display order.

fn child_blocks(&self) -> &[Block]

Related types: Block

title​

Borrows or copies title. Sets the container title. Provide either a title or a rich text title.

fn title(&self) -> Option<&PlainText>

Related types: PlainText

rich_text_title​

Borrows or copies rich_text_title. Sets a rich text block used as the title in place of a plain-text title.

fn rich_text_title(&self) -> Option<&RichTextBlock>

Related types: RichTextBlock

subtitle​

Borrows or copies subtitle. Sets the supporting text shown below the title.

fn subtitle(&self) -> Option<&Text>

Related types: Text

width​

Borrows or copies width. Sets the horizontal width of the container.

fn width(&self) -> Option<ContainerWidth>

Related types: ContainerWidth

icon​

Borrows or copies icon. Sets the image displayed beside the title.

fn icon(&self) -> Option<&ImageElement>

Related types: ImageElement

is_collapsible​

Borrows or copies is_collapsible. Sets whether users can collapse and expand the container.

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

default_collapsed​

Borrows or copies default_collapsed. Sets whether a collapsible container starts collapsed. Requires the container to be collapsible.

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

has_header_divider​

Borrows or copies has_header_divider. Sets whether Slack draws a divider below the container header. Only valid for non-collapsible containers.

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

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

ContainerBlockBuilder​

Consuming builder for ContainerBlock. Validation runs in Self::build.

child_blocks​

Adds the blocks grouped inside the container, in display order. Replaces the collection; order is preserved.

fn child_blocks<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<Block>,

Related types: Block

child_block​

Appends one item to the collection.

fn child_block(mut self, value: impl Into<Block>) -> Self

Related types: Block

title​

Sets the container title. Provide either a title or a rich text title.

fn title(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

clear_title​

Omits title, including any model default.

fn clear_title(mut self) -> Self

rich_text_title​

Sets a rich text block used as the title in place of a plain-text title.

fn rich_text_title(mut self, value: impl Into<RichTextBlock>) -> Self

Related types: RichTextBlock

clear_rich_text_title​

Omits rich_text_title, including any model default.

fn clear_rich_text_title(mut self) -> Self

subtitle​

Sets the supporting text shown below the title.

fn subtitle(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_subtitle​

Omits subtitle, including any model default.

fn clear_subtitle(mut self) -> Self

width​

Sets the horizontal width of the container.

fn width(mut self, value: ContainerWidth) -> Self

Related types: ContainerWidth

clear_width​

Omits width, including any model default.

fn clear_width(mut self) -> Self

icon​

Sets the image displayed beside the title.

fn icon(mut self, value: impl Into<ImageElement>) -> Self

Related types: ImageElement

clear_icon​

Omits icon, including any model default.

fn clear_icon(mut self) -> Self

is_collapsible​

Sets whether users can collapse and expand the container.

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

clear_is_collapsible​

Omits is_collapsible, including any model default.

fn clear_is_collapsible(mut self) -> Self

default_collapsed​

Sets whether a collapsible container starts collapsed. Requires the container to be collapsible.

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

clear_default_collapsed​

Omits default_collapsed, including any model default.

fn clear_default_collapsed(mut self) -> Self

has_header_divider​

Sets whether Slack draws a divider below the container header. Only valid for non-collapsible containers.

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

clear_has_header_divider​

Omits has_header_divider, including any model default.

fn clear_has_header_divider(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<ContainerBlock, ValidationError>

Related types: ContainerBlock, ValidationError

ContextActionsBlock​

A row of feedback or icon buttons, usually shown below AI-generated content.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> ContextActionsBlockBuilder

Related types: ContextActionsBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> ContextActionsBlockBuilder

Related types: ContextActionsBlockBuilder

elements​

Borrows or copies elements. Adds feedback buttons or icon buttons in display order.

fn elements(&self) -> &[ContextActionsElement]

Related types: ContextActionsElement

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

ContextActionsBlockBuilder​

Consuming builder for ContextActionsBlock. Validation runs in Self::build.

elements​

Adds feedback buttons or icon buttons in display order. Replaces the collection; order is preserved.

fn elements<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<ContextActionsElement>,

Related types: ContextActionsElement

element​

Appends one item to the collection.

fn element(mut self, value: impl Into<ContextActionsElement>) -> Self

Related types: ContextActionsElement

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<ContextActionsBlock, ValidationError>

Related types: ContextActionsBlock, ValidationError

ContextBlock​

A block of small, secondary images and text.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> ContextBlockBuilder

Related types: ContextBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> ContextBlockBuilder

Related types: ContextBlockBuilder

elements​

Borrows or copies elements. Adds images and text in display order.

fn elements(&self) -> &[ContextElement]

Related types: ContextElement

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

ContextBlockBuilder​

Consuming builder for ContextBlock. Validation runs in Self::build.

elements​

Adds images and text in display order. Replaces the collection; order is preserved.

fn elements<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<ContextElement>,

Related types: ContextElement

element​

Appends one item to the collection.

fn element(mut self, value: impl Into<ContextElement>) -> Self

Related types: ContextElement

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<ContextBlock, ValidationError>

Related types: ContextBlock, ValidationError

DataTableBlock​

A sortable, paginated table of raw text, numbers, and rich text.

Slack reference. The first row is the header row and cannot contain rich text. Every row must have the same number of cells, and all cell text together is limited to 20,000 characters.

builder​

Starts a builder with the documented model defaults.

fn builder() -> DataTableBlockBuilder

Related types: DataTableBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> DataTableBlockBuilder

Related types: DataTableBlockBuilder

rows​

Borrows or copies rows. Adds complete table rows in display order. Every row must have the same number of cells.

fn rows(&self) -> &[Vec<DataTableCell>]

Related types: DataTableCell

caption​

Borrows or copies caption. Sets the caption that describes the table's contents.

fn caption(&self) -> &str

page_size​

Borrows or copies page_size. Sets how many rows Slack shows per page.

fn page_size(&self) -> Option<i64>

row_header_column_index​

Borrows or copies row_header_column_index. Sets the zero-based index of the column whose cells act as row headers.

fn row_header_column_index(&self) -> Option<i64>

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

DataTableBlockBuilder​

Consuming builder for DataTableBlock. Validation runs in Self::build.

rows​

Adds complete table rows in display order. Every row must have the same number of cells. Replaces all rows, preserving row and cell order.

fn rows<I, R, T>(mut self, rows: I) -> Self
where
I: IntoIterator<Item = R>,
R: IntoIterator<Item = T>,
T: Into<DataTableCell>,

Related types: DataTableCell

row​

Appends a complete row.

fn row<I, T>(mut self, row: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<DataTableCell>,

Related types: DataTableCell

caption​

Sets the caption that describes the table's contents.

fn caption(mut self, value: impl Into<String>) -> Self

page_size​

Sets how many rows Slack shows per page.

fn page_size(mut self, value: i64) -> Self

clear_page_size​

Omits page_size, including any model default.

fn clear_page_size(mut self) -> Self

row_header_column_index​

Sets the zero-based index of the column whose cells act as row headers.

fn row_header_column_index(mut self, value: i64) -> Self

clear_row_header_column_index​

Omits row_header_column_index, including any model default.

fn clear_row_header_column_index(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<DataTableBlock, ValidationError>

Related types: DataTableBlock, ValidationError

DataVisualizationBlock​

A titled pie, bar, area, or line chart.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> DataVisualizationBlockBuilder

Related types: DataVisualizationBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> DataVisualizationBlockBuilder

Related types: DataVisualizationBlockBuilder

title​

Borrows or copies title. Sets the chart title.

fn title(&self) -> &str

chart​

Borrows or copies chart. Sets the chart to display.

fn chart(&self) -> &Chart

Related types: Chart

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

DataVisualizationBlockBuilder​

Consuming builder for DataVisualizationBlock. Validation runs in Self::build.

title​

Sets the chart title.

fn title(mut self, value: impl Into<String>) -> Self

chart​

Sets the chart to display.

fn chart(mut self, value: impl Into<Chart>) -> Self

Related types: Chart

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<DataVisualizationBlock, ValidationError>

Related types: DataVisualizationBlock, ValidationError

DividerBlock​

A horizontal rule that separates blocks.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> DividerBlockBuilder

Related types: DividerBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> DividerBlockBuilder

Related types: DividerBlockBuilder

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

DividerBlockBuilder​

Consuming builder for DividerBlock. Validation runs in Self::build.

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<DividerBlock, ValidationError>

Related types: DividerBlock, ValidationError

FileBlock​

A remote file previously added with the files.remote API.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> FileBlockBuilder

Related types: FileBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> FileBlockBuilder

Related types: FileBlockBuilder

external_id​

Borrows or copies external_id. Sets the external identifier of a remote file previously added with the files.remote API.

fn external_id(&self) -> &str

source​

Borrows or copies source. Sets the file source. Slack currently supports only remote files.

fn source(&self) -> &str

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

FileBlockBuilder​

Consuming builder for FileBlock. Validation runs in Self::build.

external_id​

Sets the external identifier of a remote file previously added with the files.remote API.

fn external_id(mut self, value: impl Into<String>) -> Self

source​

Sets the file source. Slack currently supports only remote files.

fn source(mut self, value: impl Into<String>) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<FileBlock, ValidationError>

Related types: FileBlock, ValidationError

HeaderBlock​

Large, bold plain text that introduces a group of blocks.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> HeaderBlockBuilder

Related types: HeaderBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> HeaderBlockBuilder

Related types: HeaderBlockBuilder

text​

Borrows or copies text. Sets the header text, shown in a larger bold font.

fn text(&self) -> &PlainText

Related types: PlainText

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

HeaderBlockBuilder​

Consuming builder for HeaderBlock. Validation runs in Self::build.

text​

Sets the header text, shown in a larger bold font.

fn text(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<HeaderBlock, ValidationError>

Related types: HeaderBlock, ValidationError

ImageBlock​

A standalone image with alternative text and an optional title.

Slack reference. Provide exactly one of an image URL or a Slack file.

builder​

Starts a builder with the documented model defaults.

fn builder() -> ImageBlockBuilder

Related types: ImageBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> ImageBlockBuilder

Related types: ImageBlockBuilder

image_url​

Borrows or copies image_url. Sets the publicly accessible URL of the image. Cannot be combined with a Slack file.

fn image_url(&self) -> Option<&str>

slack_file​

Borrows or copies slack_file. Sets a file hosted in Slack as the image source. Cannot be combined with an image URL.

fn slack_file(&self) -> Option<&SlackFile>

Related types: SlackFile

alt_text​

Borrows or copies alt_text. Sets a plain-text summary of the image or video for assistive technology.

fn alt_text(&self) -> &str

title​

Borrows or copies title. Sets the title shown above the image.

fn title(&self) -> Option<&PlainText>

Related types: PlainText

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

ImageBlockBuilder​

Consuming builder for ImageBlock. Validation runs in Self::build.

image_url​

Sets the publicly accessible URL of the image. Cannot be combined with a Slack file.

fn image_url(mut self, value: impl Into<String>) -> Self

clear_image_url​

Omits image_url, including any model default.

fn clear_image_url(mut self) -> Self

slack_file​

Sets a file hosted in Slack as the image source. Cannot be combined with an image URL.

fn slack_file(mut self, value: impl Into<SlackFile>) -> Self

Related types: SlackFile

clear_slack_file​

Omits slack_file, including any model default.

fn clear_slack_file(mut self) -> Self

alt_text​

Sets a plain-text summary of the image or video for assistive technology.

fn alt_text(mut self, value: impl Into<String>) -> Self

title​

Sets the title shown above the image.

fn title(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

clear_title​

Omits title, including any model default.

fn clear_title(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<ImageBlock, ValidationError>

Related types: ImageBlock, ValidationError

InputBlock​

A labelled input that collects a value in a modal, App Home, or message.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> InputBlockBuilder

Related types: InputBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> InputBlockBuilder

Related types: InputBlockBuilder

label​

Borrows or copies label. Sets the label shown above the input.

fn label(&self) -> &PlainText

Related types: PlainText

element​

Borrows or copies element. Sets the input element that collects the user's value.

fn element(&self) -> &InputElement

Related types: InputElement

dispatch_action​

Borrows or copies dispatch_action. Sets whether changing the element sends a block_actions payload immediately.

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

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

hint​

Borrows or copies hint. Sets helper text shown below the input.

fn hint(&self) -> Option<&PlainText>

Related types: PlainText

optional​

Borrows or copies optional. Sets whether the modal can be submitted when this input is empty.

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

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

InputBlockBuilder​

Consuming builder for InputBlock. Validation runs in Self::build.

label​

Sets the label shown above the input.

fn label(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

element​

Sets the input element that collects the user's value.

fn element(mut self, value: impl Into<InputElement>) -> Self

Related types: InputElement

dispatch_action​

Sets whether changing the element sends a block_actions payload immediately.

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

clear_dispatch_action​

Omits dispatch_action, including any model default.

fn clear_dispatch_action(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

hint​

Sets helper text shown below the input.

fn hint(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

clear_hint​

Omits hint, including any model default.

fn clear_hint(mut self) -> Self

optional​

Sets whether the modal can be submitted when this input is empty.

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

clear_optional​

Omits optional, including any model default.

fn clear_optional(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<InputBlock, ValidationError>

Related types: InputBlock, ValidationError

MarkdownBlock​

Standard markdown rendered by Slack, intended for AI-generated content.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> MarkdownBlockBuilder

Related types: MarkdownBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> MarkdownBlockBuilder

Related types: MarkdownBlockBuilder

text​

Borrows or copies text. Sets standard markdown content, which Slack renders directly.

fn text(&self) -> &str

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

MarkdownBlockBuilder​

Consuming builder for MarkdownBlock. Validation runs in Self::build.

text​

Sets standard markdown content, which Slack renders directly.

fn text(mut self, value: impl Into<String>) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<MarkdownBlock, ValidationError>

Related types: MarkdownBlock, ValidationError

PlanBlock​

A titled sequence of task cards.

Slack reference. Task IDs must be unique within a plan.

builder​

Starts a builder with the documented model defaults.

fn builder() -> PlanBlockBuilder

Related types: PlanBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> PlanBlockBuilder

Related types: PlanBlockBuilder

title​

Borrows or copies title. Sets the plan title.

fn title(&self) -> &str

tasks​

Borrows or copies tasks. Adds task cards in display order.

fn tasks(&self) -> &[TaskCardBlock]

Related types: TaskCardBlock

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

PlanBlockBuilder​

Consuming builder for PlanBlock. Validation runs in Self::build.

title​

Sets the plan title.

fn title(mut self, value: impl Into<String>) -> Self

tasks​

Adds task cards in display order. Replaces the collection; order is preserved.

fn tasks<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<TaskCardBlock>,

Related types: TaskCardBlock

task​

Appends one item to the collection.

fn task(mut self, value: impl Into<TaskCardBlock>) -> Self

Related types: TaskCardBlock

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<PlanBlock, ValidationError>

Related types: PlanBlock, ValidationError

RichTextBlock​

Formatted text built from sections, lists, preformatted blocks, and quotes.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> RichTextBlockBuilder

Related types: RichTextBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> RichTextBlockBuilder

Related types: RichTextBlockBuilder

elements​

Borrows or copies elements. Adds sections, lists, preformatted blocks, and quotes in display order.

fn elements(&self) -> &[RichTextBlockElement]

Related types: RichTextBlockElement

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

RichTextBlockBuilder​

Consuming builder for RichTextBlock. Validation runs in Self::build.

elements​

Adds sections, lists, preformatted blocks, and quotes in display order. Replaces the collection; order is preserved.

fn elements<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<RichTextBlockElement>,

Related types: RichTextBlockElement

element​

Appends one item to the collection.

fn element(mut self, value: impl Into<RichTextBlockElement>) -> Self

Related types: RichTextBlockElement

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<RichTextBlock, ValidationError>

Related types: RichTextBlock, ValidationError

SectionBlock​

Text, a grid of fields, or both, with an optional accessory element.

Slack reference. Provide text, fields, or both.

builder​

Starts a builder with the documented model defaults.

fn builder() -> SectionBlockBuilder

Related types: SectionBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> SectionBlockBuilder

Related types: SectionBlockBuilder

text​

Borrows or copies text. Sets the main text of the section.

fn text(&self) -> Option<&Text>

Related types: Text

fields​

Borrows or copies fields. Adds section fields, shown in a two-column grid, in display order.

fn fields(&self) -> Option<&[Text]>

Related types: Text

accessory​

Borrows or copies accessory. Sets the element displayed beside the section text.

fn accessory(&self) -> Option<&Element>

Related types: Element

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

SectionBlockBuilder​

Consuming builder for SectionBlock. Validation runs in Self::build.

text​

Sets the main text of the section.

fn text(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_text​

Omits text, including any model default.

fn clear_text(mut self) -> Self

fields​

Adds section fields, shown in a two-column grid, in display order. Replaces the collection; order is preserved.

fn fields<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<TextInput>,

Related types: TextInput

field​

Appends one item to the collection.

fn field(mut self, value: impl Into<TextInput>) -> Self

Related types: TextInput

clear_fields​

Omits fields, including any model default.

fn clear_fields(mut self) -> Self

accessory​

Sets the element displayed beside the section text.

fn accessory(mut self, value: impl Into<Element>) -> Self

Related types: Element

clear_accessory​

Omits accessory, including any model default.

fn clear_accessory(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<SectionBlock, ValidationError>

Related types: SectionBlock, ValidationError

TableBlock​

A simple table of raw text and rich text cells.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> TableBlockBuilder

Related types: TableBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> TableBlockBuilder

Related types: TableBlockBuilder

rows​

Borrows or copies rows. Adds complete table rows in display order.

fn rows(&self) -> &[Vec<TableCell>]

Related types: TableCell

column_settings​

Borrows or copies column_settings. Adds per-column settings in column order. Provide one entry for every column.

fn column_settings(&self) -> Option<&[ColumnSettings]>

Related types: ColumnSettings

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

TableBlockBuilder​

Consuming builder for TableBlock. Validation runs in Self::build.

rows​

Adds complete table rows in display order. Replaces all rows, preserving row and cell order.

fn rows<I, R, T>(mut self, rows: I) -> Self
where
I: IntoIterator<Item = R>,
R: IntoIterator<Item = T>,
T: Into<TableCell>,

Related types: TableCell

row​

Appends a complete row.

fn row<I, T>(mut self, row: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<TableCell>,

Related types: TableCell

column_settings​

Adds per-column settings in column order. Provide one entry for every column. Replaces the collection; order is preserved.

fn column_settings<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<ColumnSettings>,

Related types: ColumnSettings

column_setting​

Appends one item to the collection.

fn column_setting(mut self, value: impl Into<ColumnSettings>) -> Self

Related types: ColumnSettings

clear_column_settings​

Omits column_settings, including any model default.

fn clear_column_settings(mut self) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<TableBlock, ValidationError>

Related types: TableBlock, ValidationError

TaskCardBlock​

One task with its status, details, output, and sources.

Slack reference. A standalone task card's status cannot be pending; pending is only valid for plan tasks.

builder​

Starts a builder with the documented model defaults.

fn builder() -> TaskCardBlockBuilder

Related types: TaskCardBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> TaskCardBlockBuilder

Related types: TaskCardBlockBuilder

task_id​

Borrows or copies task_id. Sets the identifier of the task.

fn task_id(&self) -> &str

title​

Borrows or copies title. Sets the task title.

fn title(&self) -> &str

details​

Borrows or copies details. Sets a rich text description of the task.

fn details(&self) -> Option<&RichTextBlock>

Related types: RichTextBlock

output​

Borrows or copies output. Sets rich text describing the task's output.

fn output(&self) -> Option<&RichTextBlock>

Related types: RichTextBlock

sources​

Borrows or copies sources. Adds links to the sources the task used, in display order.

fn sources(&self) -> Option<&[UrlSource]>

Related types: UrlSource

status​

Borrows or copies status. Sets the task's current state.

fn status(&self) -> TaskStatus

Related types: TaskStatus

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

TaskCardBlockBuilder​

Consuming builder for TaskCardBlock. Validation runs in Self::build.

task_id​

Sets the identifier of the task.

fn task_id(mut self, value: impl Into<String>) -> Self

title​

Sets the task title.

fn title(mut self, value: impl Into<String>) -> Self

details​

Sets a rich text description of the task.

fn details(mut self, value: impl Into<RichTextBlock>) -> Self

Related types: RichTextBlock

clear_details​

Omits details, including any model default.

fn clear_details(mut self) -> Self

output​

Sets rich text describing the task's output.

fn output(mut self, value: impl Into<RichTextBlock>) -> Self

Related types: RichTextBlock

clear_output​

Omits output, including any model default.

fn clear_output(mut self) -> Self

sources​

Adds links to the sources the task used, in display order. Replaces the collection; order is preserved.

fn sources<I, T>(mut self, values: I) -> Self
where
I: IntoIterator<Item = T>,
T: Into<UrlSource>,

Related types: UrlSource

source​

Appends one item to the collection.

fn source(mut self, value: impl Into<UrlSource>) -> Self

Related types: UrlSource

clear_sources​

Omits sources, including any model default.

fn clear_sources(mut self) -> Self

status​

Sets the task's current state.

fn status(mut self, value: TaskStatus) -> Self

Related types: TaskStatus

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<TaskCardBlock, ValidationError>

Related types: TaskCardBlock, ValidationError

VideoBlock​

An embedded video player.

Slack reference.

builder​

Starts a builder with the documented model defaults.

fn builder() -> VideoBlockBuilder

Related types: VideoBlockBuilder

into_builder​

Moves every field into an editable builder, preserving explicit omissions.

fn into_builder(self) -> VideoBlockBuilder

Related types: VideoBlockBuilder

alt_text​

Borrows or copies alt_text. Sets a plain-text summary of the image or video for assistive technology.

fn alt_text(&self) -> &str

thumbnail_url​

Borrows or copies thumbnail_url. Sets the URL of the image shown before the video plays.

fn thumbnail_url(&self) -> &str

title​

Borrows or copies title. Sets the video title.

fn title(&self) -> &PlainText

Related types: PlainText

video_url​

Borrows or copies video_url. Sets the embeddable URL of the video. The domain must be listed in the app's unfurl domains.

fn video_url(&self) -> &str

block_id​

Borrows or copies block_id. Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(&self) -> Option<&str>

author_name​

Borrows or copies author_name. Sets the name of the video's author.

fn author_name(&self) -> Option<&str>

description​

Borrows or copies description. Sets the video description.

fn description(&self) -> Option<&PlainText>

Related types: PlainText

provider_icon_url​

Borrows or copies provider_icon_url. Sets the URL of the video provider's icon.

fn provider_icon_url(&self) -> Option<&str>

provider_name​

Borrows or copies provider_name. Sets the name of the video provider, such as YouTube.

fn provider_name(&self) -> Option<&str>

title_url​

Borrows or copies title_url. Sets the HTTPS URL opened when the title is clicked.

fn title_url(&self) -> Option<&str>

extensions​

Borrows checked, unmodeled JSON extension fields.

fn extensions(&self) -> &Map<String, Value>

VideoBlockBuilder​

Consuming builder for VideoBlock. Validation runs in Self::build.

alt_text​

Sets a plain-text summary of the image or video for assistive technology.

fn alt_text(mut self, value: impl Into<String>) -> Self

thumbnail_url​

Sets the URL of the image shown before the video plays.

fn thumbnail_url(mut self, value: impl Into<String>) -> Self

title​

Sets the video title.

fn title(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

video_url​

Sets the embeddable URL of the video. The domain must be listed in the app's unfurl domains.

fn video_url(mut self, value: impl Into<String>) -> Self

block_id​

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

fn block_id(mut self, value: impl Into<String>) -> Self

clear_block_id​

Omits block_id, including any model default.

fn clear_block_id(mut self) -> Self

author_name​

Sets the name of the video's author.

fn author_name(mut self, value: impl Into<String>) -> Self

clear_author_name​

Omits author_name, including any model default.

fn clear_author_name(mut self) -> Self

description​

Sets the video description.

fn description(mut self, value: impl Into<PlainTextInput>) -> Self

Related types: PlainTextInput

clear_description​

Omits description, including any model default.

fn clear_description(mut self) -> Self

provider_icon_url​

Sets the URL of the video provider's icon.

fn provider_icon_url(mut self, value: impl Into<String>) -> Self

clear_provider_icon_url​

Omits provider_icon_url, including any model default.

fn clear_provider_icon_url(mut self) -> Self

provider_name​

Sets the name of the video provider, such as YouTube.

fn provider_name(mut self, value: impl Into<String>) -> Self

clear_provider_name​

Omits provider_name, including any model default.

fn clear_provider_name(mut self) -> Self

title_url​

Sets the HTTPS URL opened when the title is clicked.

fn title_url(mut self, value: impl Into<String>) -> Self

clear_title_url​

Omits title_url, including any model default.

fn clear_title_url(mut self) -> Self

extension​

Adds or replaces an unmodeled extension; reserved names fail at build time.

fn extension(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self

build​

Validates all fields and their receiving context.

Errors Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

fn build(self) -> Result<VideoBlock, ValidationError>

Related types: ValidationError, VideoBlock