pub struct SlackBlockWorkflowButtonElement {
pub action_id: SlackActionId,
pub text: SlackBlockPlainTextOnly,
pub workflow: SlackWorkflow,
pub style: Option<SlackBlockButtonStyle>,
pub accessibility_label: Option<SlackAccessibilityLabel>,
}Expand description
- https://docs.slack.dev/reference/block-kit/block-elements/workflow-button-element
Fields§
§action_id: SlackActionId§text: SlackBlockPlainTextOnly§workflow: SlackWorkflow§style: Option<SlackBlockButtonStyle>§accessibility_label: Option<SlackAccessibilityLabel>Implementations§
Source§impl SlackBlockWorkflowButtonElement
impl SlackBlockWorkflowButtonElement
Sourcepub fn new(
action_id: SlackActionId,
text: SlackBlockPlainTextOnly,
workflow: SlackWorkflow,
) -> Self
pub fn new( action_id: SlackActionId, text: SlackBlockPlainTextOnly, workflow: SlackWorkflow, ) -> Self
Creates a new SlackBlockWorkflowButtonElement from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn action_id(&mut self, value: SlackActionId) -> &mut Self
pub fn action_id(&mut self, value: SlackActionId) -> &mut Self
Sets action_id to value.
Sourcepub fn with_action_id(self, value: SlackActionId) -> Self
pub fn with_action_id(self, value: SlackActionId) -> Self
Returns self with action_id set to value.
Sourcepub fn text(&mut self, value: SlackBlockPlainTextOnly) -> &mut Self
pub fn text(&mut self, value: SlackBlockPlainTextOnly) -> &mut Self
Sets text to value.
Sourcepub fn with_text(self, value: SlackBlockPlainTextOnly) -> Self
pub fn with_text(self, value: SlackBlockPlainTextOnly) -> Self
Returns self with text set to value.
Sourcepub fn workflow(&mut self, value: SlackWorkflow) -> &mut Self
pub fn workflow(&mut self, value: SlackWorkflow) -> &mut Self
Sets workflow to value.
Sourcepub fn with_workflow(self, value: SlackWorkflow) -> Self
pub fn with_workflow(self, value: SlackWorkflow) -> Self
Returns self with workflow set to value.
Sourcepub fn style(&mut self, value: SlackBlockButtonStyle) -> &mut Self
pub fn style(&mut self, value: SlackBlockButtonStyle) -> &mut Self
Sets style to Some(value).
Sourcepub fn reset_style(&mut self) -> &mut Self
pub fn reset_style(&mut self) -> &mut Self
Sets style to None.
Sourcepub fn mopt_style(&mut self, value: Option<SlackBlockButtonStyle>) -> &mut Self
pub fn mopt_style(&mut self, value: Option<SlackBlockButtonStyle>) -> &mut Self
Sets style to the given Option.
Sourcepub fn with_style(self, value: SlackBlockButtonStyle) -> Self
pub fn with_style(self, value: SlackBlockButtonStyle) -> Self
Returns self with style set to Some(value).
Sourcepub fn without_style(self) -> Self
pub fn without_style(self) -> Self
Returns self with style set to None.
Sourcepub fn opt_style(self, value: Option<SlackBlockButtonStyle>) -> Self
pub fn opt_style(self, value: Option<SlackBlockButtonStyle>) -> Self
Returns self with style set to the given Option.
Sourcepub fn accessibility_label(
&mut self,
value: SlackAccessibilityLabel,
) -> &mut Self
pub fn accessibility_label( &mut self, value: SlackAccessibilityLabel, ) -> &mut Self
Sets accessibility_label to Some(value).
Sourcepub fn reset_accessibility_label(&mut self) -> &mut Self
pub fn reset_accessibility_label(&mut self) -> &mut Self
Sets accessibility_label to None.
Sourcepub fn mopt_accessibility_label(
&mut self,
value: Option<SlackAccessibilityLabel>,
) -> &mut Self
pub fn mopt_accessibility_label( &mut self, value: Option<SlackAccessibilityLabel>, ) -> &mut Self
Sets accessibility_label to the given Option.
Sourcepub fn with_accessibility_label(self, value: SlackAccessibilityLabel) -> Self
pub fn with_accessibility_label(self, value: SlackAccessibilityLabel) -> Self
Returns self with accessibility_label set to Some(value).
Sourcepub fn without_accessibility_label(self) -> Self
pub fn without_accessibility_label(self) -> Self
Returns self with accessibility_label set to None.
Sourcepub fn opt_accessibility_label(
self,
value: Option<SlackAccessibilityLabel>,
) -> Self
pub fn opt_accessibility_label( self, value: Option<SlackAccessibilityLabel>, ) -> Self
Returns self with accessibility_label set to the given Option.