Struct twilight_model::application::component::button::Button
source · [−]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.
Fields
custom_id: Option<String>
User defined identifier for the button.
This field is required when using the following ButtonStyle
s:
disabled: bool
Whether 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: ButtonStyle
Style variant of the button.
url: Option<String>
URL for buttons of a ButtonStyle::Link
style.
Trait Implementations
impl Eq for Button
impl StructuralEq for Button
impl StructuralPartialEq for Button
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more