pub struct ButtonBuilder { /* private fields */ }Expand description
Create a Button with a builder.
Implementations§
Source§impl ButtonBuilder
impl ButtonBuilder
Sourcepub fn custom_emoji(
self,
name: Option<String>,
id: Id<EmojiMarker>,
animated: bool,
) -> Self
pub fn custom_emoji( self, name: Option<String>, id: Id<EmojiMarker>, animated: bool, ) -> Self
Set a custom emoji for this button.
This is unavailable for buttons with a SKU ID.
Sourcepub fn unicode_emoji(self, emoji: String) -> Self
pub fn unicode_emoji(self, emoji: String) -> Self
Set a unicode emoji for this button.
This is unavailable for buttons with a SKU ID.
Sourcepub const fn with_custom_id(
custom_id: String,
label: String,
style: ButtonStyle,
) -> Self
pub const fn with_custom_id( custom_id: String, label: String, style: ButtonStyle, ) -> Self
Create a new builder for a button with a given custom ID.
Sourcepub const fn with_sku_id(sku_id: Id<SkuMarker>) -> Self
pub const fn with_sku_id(sku_id: Id<SkuMarker>) -> Self
Create a new builder for a button with ButtonStyle::Premium.
Sourcepub const fn with_url(url: String, label: String) -> Self
pub const fn with_url(url: String, label: String) -> Self
Create a new builder for a button with ButtonStyle::Link.
Trait Implementations§
Source§impl Clone for ButtonBuilder
impl Clone for ButtonBuilder
Source§fn clone(&self) -> ButtonBuilder
fn clone(&self) -> ButtonBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ButtonBuilder
impl Debug for ButtonBuilder
Source§impl Hash for ButtonBuilder
impl Hash for ButtonBuilder
Source§impl PartialEq for ButtonBuilder
impl PartialEq for ButtonBuilder
impl Eq for ButtonBuilder
impl StructuralPartialEq for ButtonBuilder
Auto Trait Implementations§
impl Freeze for ButtonBuilder
impl RefUnwindSafe for ButtonBuilder
impl Send for ButtonBuilder
impl Sync for ButtonBuilder
impl Unpin for ButtonBuilder
impl UnwindSafe for ButtonBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.