pub struct SlackTaskCardBlock {
pub task_id: SlackTaskId,
pub title: String,
pub block_id: Option<SlackBlockId>,
pub status: Option<SlackTaskCardStatus>,
pub icon: Option<SlackTaskCardIcon>,
pub hide_title: Option<bool>,
pub details: Option<SlackRichTextInlineContent>,
pub output: Option<SlackRichTextInlineContent>,
pub sources: Option<Vec<SlackTaskCardSource>>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/task-card-block
Fields§
§task_id: SlackTaskId§title: String§block_id: Option<SlackBlockId>§status: Option<SlackTaskCardStatus>§icon: Option<SlackTaskCardIcon>§hide_title: Option<bool>§details: Option<SlackRichTextInlineContent>§output: Option<SlackRichTextInlineContent>§sources: Option<Vec<SlackTaskCardSource>>Implementations§
Source§impl SlackTaskCardBlock
impl SlackTaskCardBlock
Sourcepub fn new(task_id: SlackTaskId, title: String) -> Self
pub fn new(task_id: SlackTaskId, title: String) -> Self
Creates a new SlackTaskCardBlock from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn task_id(&mut self, value: SlackTaskId) -> &mut Self
pub fn task_id(&mut self, value: SlackTaskId) -> &mut Self
Sets task_id to value.
Sourcepub fn with_task_id(self, value: SlackTaskId) -> Self
pub fn with_task_id(self, value: SlackTaskId) -> Self
Returns self with task_id set to value.
Sourcepub fn with_title(self, value: String) -> Self
pub fn with_title(self, value: String) -> Self
Returns self with title 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 status(&mut self, value: SlackTaskCardStatus) -> &mut Self
pub fn status(&mut self, value: SlackTaskCardStatus) -> &mut Self
Sets status to Some(value).
Sourcepub fn reset_status(&mut self) -> &mut Self
pub fn reset_status(&mut self) -> &mut Self
Sets status to None.
Sourcepub fn mopt_status(&mut self, value: Option<SlackTaskCardStatus>) -> &mut Self
pub fn mopt_status(&mut self, value: Option<SlackTaskCardStatus>) -> &mut Self
Sets status to the given Option.
Sourcepub fn with_status(self, value: SlackTaskCardStatus) -> Self
pub fn with_status(self, value: SlackTaskCardStatus) -> Self
Returns self with status set to Some(value).
Sourcepub fn without_status(self) -> Self
pub fn without_status(self) -> Self
Returns self with status set to None.
Sourcepub fn opt_status(self, value: Option<SlackTaskCardStatus>) -> Self
pub fn opt_status(self, value: Option<SlackTaskCardStatus>) -> Self
Returns self with status set to the given Option.
Sourcepub fn icon(&mut self, value: SlackTaskCardIcon) -> &mut Self
pub fn icon(&mut self, value: SlackTaskCardIcon) -> &mut Self
Sets icon to Some(value).
Sourcepub fn reset_icon(&mut self) -> &mut Self
pub fn reset_icon(&mut self) -> &mut Self
Sets icon to None.
Sourcepub fn mopt_icon(&mut self, value: Option<SlackTaskCardIcon>) -> &mut Self
pub fn mopt_icon(&mut self, value: Option<SlackTaskCardIcon>) -> &mut Self
Sets icon to the given Option.
Sourcepub fn with_icon(self, value: SlackTaskCardIcon) -> Self
pub fn with_icon(self, value: SlackTaskCardIcon) -> Self
Returns self with icon set to Some(value).
Sourcepub fn without_icon(self) -> Self
pub fn without_icon(self) -> Self
Returns self with icon set to None.
Sourcepub fn opt_icon(self, value: Option<SlackTaskCardIcon>) -> Self
pub fn opt_icon(self, value: Option<SlackTaskCardIcon>) -> Self
Returns self with icon set to the given Option.
Sourcepub fn hide_title(&mut self, value: bool) -> &mut Self
pub fn hide_title(&mut self, value: bool) -> &mut Self
Sets hide_title to Some(value).
Sourcepub fn reset_hide_title(&mut self) -> &mut Self
pub fn reset_hide_title(&mut self) -> &mut Self
Sets hide_title to None.
Sourcepub fn mopt_hide_title(&mut self, value: Option<bool>) -> &mut Self
pub fn mopt_hide_title(&mut self, value: Option<bool>) -> &mut Self
Sets hide_title to the given Option.
Sourcepub fn with_hide_title(self, value: bool) -> Self
pub fn with_hide_title(self, value: bool) -> Self
Returns self with hide_title set to Some(value).
Sourcepub fn without_hide_title(self) -> Self
pub fn without_hide_title(self) -> Self
Returns self with hide_title set to None.
Sourcepub fn opt_hide_title(self, value: Option<bool>) -> Self
pub fn opt_hide_title(self, value: Option<bool>) -> Self
Returns self with hide_title set to the given Option.
Sourcepub fn details(&mut self, value: SlackRichTextInlineContent) -> &mut Self
pub fn details(&mut self, value: SlackRichTextInlineContent) -> &mut Self
Sets details to Some(value).
Sourcepub fn reset_details(&mut self) -> &mut Self
pub fn reset_details(&mut self) -> &mut Self
Sets details to None.
Sourcepub fn mopt_details(
&mut self,
value: Option<SlackRichTextInlineContent>,
) -> &mut Self
pub fn mopt_details( &mut self, value: Option<SlackRichTextInlineContent>, ) -> &mut Self
Sets details to the given Option.
Sourcepub fn with_details(self, value: SlackRichTextInlineContent) -> Self
pub fn with_details(self, value: SlackRichTextInlineContent) -> Self
Returns self with details set to Some(value).
Sourcepub fn without_details(self) -> Self
pub fn without_details(self) -> Self
Returns self with details set to None.
Sourcepub fn opt_details(self, value: Option<SlackRichTextInlineContent>) -> Self
pub fn opt_details(self, value: Option<SlackRichTextInlineContent>) -> Self
Returns self with details set to the given Option.
Sourcepub fn output(&mut self, value: SlackRichTextInlineContent) -> &mut Self
pub fn output(&mut self, value: SlackRichTextInlineContent) -> &mut Self
Sets output to Some(value).
Sourcepub fn reset_output(&mut self) -> &mut Self
pub fn reset_output(&mut self) -> &mut Self
Sets output to None.
Sourcepub fn mopt_output(
&mut self,
value: Option<SlackRichTextInlineContent>,
) -> &mut Self
pub fn mopt_output( &mut self, value: Option<SlackRichTextInlineContent>, ) -> &mut Self
Sets output to the given Option.
Sourcepub fn with_output(self, value: SlackRichTextInlineContent) -> Self
pub fn with_output(self, value: SlackRichTextInlineContent) -> Self
Returns self with output set to Some(value).
Sourcepub fn without_output(self) -> Self
pub fn without_output(self) -> Self
Returns self with output set to None.
Sourcepub fn opt_output(self, value: Option<SlackRichTextInlineContent>) -> Self
pub fn opt_output(self, value: Option<SlackRichTextInlineContent>) -> Self
Returns self with output set to the given Option.
Sourcepub fn sources(&mut self, value: Vec<SlackTaskCardSource>) -> &mut Self
pub fn sources(&mut self, value: Vec<SlackTaskCardSource>) -> &mut Self
Sets sources to Some(value).
Sourcepub fn reset_sources(&mut self) -> &mut Self
pub fn reset_sources(&mut self) -> &mut Self
Sets sources to None.
Sourcepub fn mopt_sources(
&mut self,
value: Option<Vec<SlackTaskCardSource>>,
) -> &mut Self
pub fn mopt_sources( &mut self, value: Option<Vec<SlackTaskCardSource>>, ) -> &mut Self
Sets sources to the given Option.
Sourcepub fn with_sources(self, value: Vec<SlackTaskCardSource>) -> Self
pub fn with_sources(self, value: Vec<SlackTaskCardSource>) -> Self
Returns self with sources set to Some(value).
Sourcepub fn without_sources(self) -> Self
pub fn without_sources(self) -> Self
Returns self with sources set to None.
Sourcepub fn opt_sources(self, value: Option<Vec<SlackTaskCardSource>>) -> Self
pub fn opt_sources(self, value: Option<Vec<SlackTaskCardSource>>) -> Self
Returns self with sources set to the given Option.