Struct twilight_model::application::component::button::Button [−][src]
pub struct Button {
pub custom_id: Option<String>,
pub disabled: bool,
pub emoji: Option<ReactionType>,
pub label: Option<String>,
pub style: ButtonStyle,
pub url: Option<String>,
}Expand description
Clickable interactive components that render on messages.
Refer to Discord Docs/Message Components for additional information.
Fields
custom_id: Option<String>User defined identifier for the button.
This field is required when using the following ButtonStyles:
disabled: boolWhether the button is disabled.
Defaults to false.
emoji: Option<ReactionType>Visual emoji for clients to display with the button.
label: Option<String>Text appearing on the button.
style: ButtonStyleStyle variant of the button.
url: Option<String>URL for buttons of a ButtonStyle::Link style.
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Button
impl UnwindSafe for Button
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
