pub struct Button(/* private fields */);Expand description
Builds a types::Button.
Implementations§
Source§impl Button
impl Button
Sourcepub fn primary(custom_id: impl Into<String>, label: impl Into<String>) -> Self
pub fn primary(custom_id: impl Into<String>, label: impl Into<String>) -> Self
A primary (blurple) button.
Sourcepub fn secondary(custom_id: impl Into<String>, label: impl Into<String>) -> Self
pub fn secondary(custom_id: impl Into<String>, label: impl Into<String>) -> Self
A secondary (grey) button.
Sourcepub fn success(custom_id: impl Into<String>, label: impl Into<String>) -> Self
pub fn success(custom_id: impl Into<String>, label: impl Into<String>) -> Self
A success (green) button.
Sourcepub fn danger(custom_id: impl Into<String>, label: impl Into<String>) -> Self
pub fn danger(custom_id: impl Into<String>, label: impl Into<String>) -> Self
A danger (red) button.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnsafeUnpin 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