#[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 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§impl Serialize for ButtonStyle
impl Serialize for ButtonStyle
impl Copy for ButtonStyle
impl Eq for ButtonStyle
impl StructuralPartialEq for ButtonStyle
Auto Trait Implementations§
impl Freeze for ButtonStyle
impl RefUnwindSafe for ButtonStyle
impl Send for ButtonStyle
impl Sync for ButtonStyle
impl Unpin for ButtonStyle
impl UnwindSafe for ButtonStyle
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
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)
clone_to_uninit
)