Struct serenity::model::interactions::message_component::Button [−][src]
pub struct Button {
pub kind: ComponentType,
pub style: ButtonStyle,
pub label: Option<String>,
pub emoji: Option<ReactionType>,
pub custom_id: Option<String>,
pub url: Option<String>,
pub disabled: bool,
}
Expand description
A button component.
Fields
kind: ComponentType
The component type, it will always be ComponentType::Button
.
style: ButtonStyle
The button style.
label: Option<String>
The text which appears on the button.
emoji: Option<ReactionType>
The emoji of this button, if there is one.
custom_id: Option<String>
An identifier defined by the developer for the button.
url: Option<String>
The url of the button, if there is one.
disabled: bool
Whether the button is disabled.
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. 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