Struct discord_flows::model::component::Button
source · 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§
source§impl<'de> Deserialize<'de> for Button
impl<'de> Deserialize<'de> for Button
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Button, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Button, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Button> for ActionRowComponent
impl From<Button> for ActionRowComponent
source§fn from(component: Button) -> ActionRowComponent
fn from(component: Button) -> ActionRowComponent
Converts to this type from the input type.
source§impl Serialize for Button
impl Serialize for Button
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
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
Mutably borrows from an owned value. Read more