#[non_exhaustive]pub enum ButtonStyle {
Primary,
Secondary,
Success,
Danger,
Link,
Premium,
Unknown(u8),
}
Expand description
Style of a Button
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Primary
Button indicates a primary action.
Selecting this button style requires specifying the
Button::custom_id
field.
Secondary
Button indicates a secondary action.
Selecting this button style requires specifying the
Button::custom_id
field.
Success
Button indicates a successful action.
Selecting this button style requires specifying the
Button::custom_id
field.
Danger
Button indicates a dangerous action.
Selecting this button style requires specifying the
Button::custom_id
field.
Link
Button indicates an action with a link.
Selecting this button style requires specifying the Button::url
field.
Premium
Button indicates a premium upgrade action.
Selecting this button style requires specifying the Button::sku_id
field.
The following fields are not available for this button style: Button::custom_id
, Button::label
, Button::url
& Button::emoji
.
Premium button styles do not fire an interaction event.
Unknown(u8)
Variant value is unknown to the library.
Trait Implementations§
Source§impl Clone for ButtonStyle
impl Clone for ButtonStyle
Source§fn clone(&self) -> ButtonStyle
fn clone(&self) -> ButtonStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more