Enum twilight_model::channel::message::component::ButtonStyle
source · #[non_exhaustive]
pub enum ButtonStyle {
Primary,
Secondary,
Success,
Danger,
Link,
Unknown(u8),
}
Expand description
Style of a Button
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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
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 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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ButtonStyle> for u8
impl From<ButtonStyle> for u8
source§fn from(value: ButtonStyle) -> Self
fn from(value: ButtonStyle) -> Self
Converts to this type from the input type.
source§impl From<u8> for ButtonStyle
impl From<u8> for ButtonStyle
source§impl Hash for ButtonStyle
impl Hash for ButtonStyle
source§impl PartialEq<ButtonStyle> for ButtonStyle
impl PartialEq<ButtonStyle> for ButtonStyle
source§fn eq(&self, other: &ButtonStyle) -> bool
fn eq(&self, other: &ButtonStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.