pub struct Button<D> {
pub id: String,
pub disabled: bool,
pub emoji: Option<ReactionType>,
pub label: Option<String>,
pub style: ButtonStyle,
pub url: Option<String>,
pub on_click: Option<Callback<D>>,
}Fields§
§id: String§disabled: bool§emoji: Option<ReactionType>§label: Option<String>§style: ButtonStyle§url: Option<String>§on_click: Option<Callback<D>>Implementations§
source§impl<D> Button<D>
impl<D> Button<D>
pub fn new<S: Into<String>>(label: S) -> Self
pub fn id<S: Into<String>>(self, id: S) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn emoji(self, emoji: ReactionType) -> Self
pub fn label<S: Into<String>>(self, label: S) -> Self
pub fn style(self, style: ButtonStyle) -> Self
pub fn url<S: Into<String>>(self, url: S) -> Self
pub fn on_click<F: 'static + Fn(&Box<InteractionCreate>, &Arc<Context<D>>, D) -> Pin<Box<dyn Future<Output = D> + Send + Sync>> + Send + Sync>( self, f: F ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<D> !RefUnwindSafe for Button<D>
impl<D> Send for Button<D>
impl<D> Sync for Button<D>
impl<D> Unpin for Button<D>
impl<D> !UnwindSafe for Button<D>
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