#[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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ButtonStyle
impl Debug for ButtonStyle
Source§impl<'de> Deserialize<'de> for ButtonStyle
impl<'de> Deserialize<'de> for ButtonStyle
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>,
Source§impl From<ButtonStyle> for u8
impl From<ButtonStyle> for u8
Source§fn from(value: ButtonStyle) -> Self
fn from(value: ButtonStyle) -> Self
Source§impl From<u8> for ButtonStyle
impl From<u8> for ButtonStyle
Source§impl Hash for ButtonStyle
impl Hash for ButtonStyle
Source§impl PartialEq for ButtonStyle
impl PartialEq for ButtonStyle
Source§fn eq(&self, other: &ButtonStyle) -> bool
fn eq(&self, other: &ButtonStyle) -> bool
self and other values to be equal, and is used by ==.