Struct sfr_types::ButtonElement
source · pub struct ButtonElement {
pub text: TextObject,
pub action_id: Option<ActionId>,
pub url: Option<String>,
pub value: Option<String>,
pub style: ButtonStyle,
pub confirm: Option<ConfirmObect>,
}Expand description
Button element.
https://api.slack.com/reference/block-kit/block-elements#button
Fields§
§text: TextObjectA text object that defines the button’s text.
action_id: Option<ActionId>An identifier for this action.
url: Option<String>A URL to load in the user’s browser when the button is clicked.
value: Option<String>The value to send along with the interaction payload.
style: ButtonStyleprimary gives buttons a green outline and text, ideal for affirmation or confirmation actions.
confirm: Option<ConfirmObect>A confirm object that defines an optional confirmation dialog after the button is clicked.
Trait Implementations§
source§impl Clone for ButtonElement
impl Clone for ButtonElement
source§fn clone(&self) -> ButtonElement
fn clone(&self) -> ButtonElement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ButtonElement
impl Debug for ButtonElement
Auto Trait Implementations§
impl Freeze for ButtonElement
impl RefUnwindSafe for ButtonElement
impl Send for ButtonElement
impl Sync for ButtonElement
impl Unpin for ButtonElement
impl UnwindSafe for ButtonElement
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)