pub struct SlackBlockIconButtonElement {
pub action_id: SlackActionId,
pub icon: String,
pub text: SlackBlockPlainTextOnly,
pub value: Option<String>,
pub confirm: Option<SlackBlockConfirmItem>,
pub accessibility_label: Option<SlackAccessibilityLabel>,
pub visible_to_user_ids: Option<Vec<SlackUserId>>,
}Fields§
§action_id: SlackActionId§icon: String§text: SlackBlockPlainTextOnly§value: Option<String>§confirm: Option<SlackBlockConfirmItem>§accessibility_label: Option<SlackAccessibilityLabel>§visible_to_user_ids: Option<Vec<SlackUserId>>Implementations§
Source§impl SlackBlockIconButtonElement
impl SlackBlockIconButtonElement
Sourcepub fn new(
action_id: SlackActionId,
icon: String,
text: SlackBlockPlainTextOnly,
) -> Self
pub fn new( action_id: SlackActionId, icon: String, text: SlackBlockPlainTextOnly, ) -> Self
Creates a new SlackBlockIconButtonElement 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 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 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.
Sourcepub fn visible_to_user_ids(&mut self, value: Vec<SlackUserId>) -> &mut Self
pub fn visible_to_user_ids(&mut self, value: Vec<SlackUserId>) -> &mut Self
Sets visible_to_user_ids to Some(value).
Sourcepub fn reset_visible_to_user_ids(&mut self) -> &mut Self
pub fn reset_visible_to_user_ids(&mut self) -> &mut Self
Sets visible_to_user_ids to None.
Sourcepub fn mopt_visible_to_user_ids(
&mut self,
value: Option<Vec<SlackUserId>>,
) -> &mut Self
pub fn mopt_visible_to_user_ids( &mut self, value: Option<Vec<SlackUserId>>, ) -> &mut Self
Sets visible_to_user_ids to the given Option.
Sourcepub fn with_visible_to_user_ids(self, value: Vec<SlackUserId>) -> Self
pub fn with_visible_to_user_ids(self, value: Vec<SlackUserId>) -> Self
Returns self with visible_to_user_ids set to Some(value).
Sourcepub fn without_visible_to_user_ids(self) -> Self
pub fn without_visible_to_user_ids(self) -> Self
Returns self with visible_to_user_ids set to None.
Sourcepub fn opt_visible_to_user_ids(self, value: Option<Vec<SlackUserId>>) -> Self
pub fn opt_visible_to_user_ids(self, value: Option<Vec<SlackUserId>>) -> Self
Returns self with visible_to_user_ids set to the given Option.