pub struct SlackDataTableBlock {
pub caption: String,
pub rows: Vec<Vec<SlackDataTableCell>>,
pub block_id: Option<SlackBlockId>,
pub page_size: Option<u32>,
pub row_header_column_index: Option<u32>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/data-table-block
- The first row is the header and may not hold
rich_textcells. 2–201 rows, - 1–20 columns, every row the same length;
page_sizeis 1–100 (default 5).
Fields§
§caption: String§rows: Vec<Vec<SlackDataTableCell>>§block_id: Option<SlackBlockId>§page_size: Option<u32>§row_header_column_index: Option<u32>Implementations§
Source§impl SlackDataTableBlock
impl SlackDataTableBlock
Sourcepub fn new(caption: String, rows: Vec<Vec<SlackDataTableCell>>) -> Self
pub fn new(caption: String, rows: Vec<Vec<SlackDataTableCell>>) -> Self
Creates a new SlackDataTableBlock from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn with_caption(self, value: String) -> Self
pub fn with_caption(self, value: String) -> Self
Returns self with caption set to value.
Sourcepub fn rows(&mut self, value: Vec<Vec<SlackDataTableCell>>) -> &mut Self
pub fn rows(&mut self, value: Vec<Vec<SlackDataTableCell>>) -> &mut Self
Sets rows to value.
Sourcepub fn with_rows(self, value: Vec<Vec<SlackDataTableCell>>) -> Self
pub fn with_rows(self, value: Vec<Vec<SlackDataTableCell>>) -> Self
Returns self with rows set to value.
Sourcepub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
pub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
Sets block_id to Some(value).
Sourcepub fn reset_block_id(&mut self) -> &mut Self
pub fn reset_block_id(&mut self) -> &mut Self
Sets block_id to None.
Sourcepub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
pub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
Sets block_id to the given Option.
Sourcepub fn with_block_id(self, value: SlackBlockId) -> Self
pub fn with_block_id(self, value: SlackBlockId) -> Self
Returns self with block_id set to Some(value).
Sourcepub fn without_block_id(self) -> Self
pub fn without_block_id(self) -> Self
Returns self with block_id set to None.
Sourcepub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
pub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
Returns self with block_id set to the given Option.
Sourcepub fn reset_page_size(&mut self) -> &mut Self
pub fn reset_page_size(&mut self) -> &mut Self
Sets page_size to None.
Sourcepub fn mopt_page_size(&mut self, value: Option<u32>) -> &mut Self
pub fn mopt_page_size(&mut self, value: Option<u32>) -> &mut Self
Sets page_size to the given Option.
Sourcepub fn with_page_size(self, value: u32) -> Self
pub fn with_page_size(self, value: u32) -> Self
Returns self with page_size set to Some(value).
Sourcepub fn without_page_size(self) -> Self
pub fn without_page_size(self) -> Self
Returns self with page_size set to None.
Sourcepub fn opt_page_size(self, value: Option<u32>) -> Self
pub fn opt_page_size(self, value: Option<u32>) -> Self
Returns self with page_size set to the given Option.
Sourcepub fn row_header_column_index(&mut self, value: u32) -> &mut Self
pub fn row_header_column_index(&mut self, value: u32) -> &mut Self
Sets row_header_column_index to Some(value).
Sourcepub fn reset_row_header_column_index(&mut self) -> &mut Self
pub fn reset_row_header_column_index(&mut self) -> &mut Self
Sets row_header_column_index to None.
Sourcepub fn mopt_row_header_column_index(&mut self, value: Option<u32>) -> &mut Self
pub fn mopt_row_header_column_index(&mut self, value: Option<u32>) -> &mut Self
Sets row_header_column_index to the given Option.
Sourcepub fn with_row_header_column_index(self, value: u32) -> Self
pub fn with_row_header_column_index(self, value: u32) -> Self
Returns self with row_header_column_index set to Some(value).
Sourcepub fn without_row_header_column_index(self) -> Self
pub fn without_row_header_column_index(self) -> Self
Returns self with row_header_column_index set to None.
Sourcepub fn opt_row_header_column_index(self, value: Option<u32>) -> Self
pub fn opt_row_header_column_index(self, value: Option<u32>) -> Self
Returns self with row_header_column_index set to the given Option.