pub struct SlackBlockButtonElement {
pub action_id: SlackActionId,
pub text: SlackBlockPlainTextOnly,
pub url: Option<Url>,
pub value: Option<String>,
pub style: Option<SlackBlockButtonStyle>,
pub confirm: Option<SlackBlockConfirmItem>,
pub accessibility_label: Option<SlackAccessibilityLabel>,
}Fields§
§action_id: SlackActionId§text: SlackBlockPlainTextOnly§url: Option<Url>§value: Option<String>§style: Option<SlackBlockButtonStyle>§confirm: Option<SlackBlockConfirmItem>§accessibility_label: Option<SlackAccessibilityLabel>Implementations§
Source§impl SlackBlockButtonElement
impl SlackBlockButtonElement
Sourcepub fn new(action_id: SlackActionId, text: SlackBlockPlainTextOnly) -> Self
pub fn new(action_id: SlackActionId, text: SlackBlockPlainTextOnly) -> Self
Creates a new SlackBlockButtonElement 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 without_url(self) -> Self
pub fn without_url(self) -> Self
Returns self with url set to None.
Sourcepub fn opt_url(self, value: Option<Url>) -> Self
pub fn opt_url(self, value: Option<Url>) -> Self
Returns self with url set to the given Option.
Sourcepub fn reset_value(&mut self) -> &mut Self
pub fn reset_value(&mut self) -> &mut Self
Sets value to None.
Sourcepub fn mopt_value(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_value(&mut self, value: Option<String>) -> &mut Self
Sets value to the given Option.
Sourcepub fn with_value(self, value: String) -> Self
pub fn with_value(self, value: String) -> Self
Returns self with value set to Some(value).
Sourcepub fn without_value(self) -> Self
pub fn without_value(self) -> Self
Returns self with value set to None.
Sourcepub fn opt_value(self, value: Option<String>) -> Self
pub fn opt_value(self, value: Option<String>) -> Self
Returns self with value set to the given Option.
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 confirm(&mut self, value: SlackBlockConfirmItem) -> &mut Self
pub fn confirm(&mut self, value: SlackBlockConfirmItem) -> &mut Self
Sets confirm to Some(value).
Sourcepub fn reset_confirm(&mut self) -> &mut Self
pub fn reset_confirm(&mut self) -> &mut Self
Sets confirm to None.
Sourcepub fn mopt_confirm(
&mut self,
value: Option<SlackBlockConfirmItem>,
) -> &mut Self
pub fn mopt_confirm( &mut self, value: Option<SlackBlockConfirmItem>, ) -> &mut Self
Sets confirm to the given Option.
Sourcepub fn with_confirm(self, value: SlackBlockConfirmItem) -> Self
pub fn with_confirm(self, value: SlackBlockConfirmItem) -> Self
Returns self with confirm set to Some(value).
Sourcepub fn without_confirm(self) -> Self
pub fn without_confirm(self) -> Self
Returns self with confirm set to None.
Sourcepub fn opt_confirm(self, value: Option<SlackBlockConfirmItem>) -> Self
pub fn opt_confirm(self, value: Option<SlackBlockConfirmItem>) -> Self
Returns self with confirm 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.