pub struct SlackFeedbackButtonItem {
pub action_id: SlackActionId,
pub value: String,
pub text: SlackBlockPlainTextOnly,
pub confirm: Option<SlackBlockConfirmItem>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/context-actions-block
- https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element
- https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element
Fields§
§action_id: SlackActionId§value: String§text: SlackBlockPlainTextOnly§confirm: Option<SlackBlockConfirmItem>Implementations§
Source§impl SlackFeedbackButtonItem
impl SlackFeedbackButtonItem
Sourcepub fn new(
action_id: SlackActionId,
value: String,
text: SlackBlockPlainTextOnly,
) -> Self
pub fn new( action_id: SlackActionId, value: String, text: SlackBlockPlainTextOnly, ) -> Self
Creates a new SlackFeedbackButtonItem 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 with_value(self, value: String) -> Self
pub fn with_value(self, value: String) -> Self
Returns self with value 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 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.
Trait Implementations§
Source§impl Clone for SlackFeedbackButtonItem
impl Clone for SlackFeedbackButtonItem
Source§impl Debug for SlackFeedbackButtonItem
impl Debug for SlackFeedbackButtonItem
Source§impl<'de> Deserialize<'de> for SlackFeedbackButtonItem
impl<'de> Deserialize<'de> for SlackFeedbackButtonItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SlackFeedbackButtonItemInit> for SlackFeedbackButtonItem
impl From<SlackFeedbackButtonItemInit> for SlackFeedbackButtonItem
Source§fn from(value: SlackFeedbackButtonItemInit) -> Self
fn from(value: SlackFeedbackButtonItemInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackFeedbackButtonItem
impl PartialEq for SlackFeedbackButtonItem
Source§impl Serialize for SlackFeedbackButtonItem
impl Serialize for SlackFeedbackButtonItem
impl StructuralPartialEq for SlackFeedbackButtonItem
Auto Trait Implementations§
impl Freeze for SlackFeedbackButtonItem
impl RefUnwindSafe for SlackFeedbackButtonItem
impl Send for SlackFeedbackButtonItem
impl Sync for SlackFeedbackButtonItem
impl Unpin for SlackFeedbackButtonItem
impl UnsafeUnpin for SlackFeedbackButtonItem
impl UnwindSafe for SlackFeedbackButtonItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more