pub struct ButtonBuilder<'a> { /* private fields */ }Expand description
Builder for creating a Button.
Implementations§
Source§impl<'a> ButtonBuilder<'a>
impl<'a> ButtonBuilder<'a>
Sourcepub fn style(self, style: ButtonStyle) -> Self
pub fn style(self, style: ButtonStyle) -> Self
Set style.
Sourcepub fn label(self, label: impl Into<TitanString<'a>>) -> Self
pub fn label(self, label: impl Into<TitanString<'a>>) -> Self
Set label.
Sourcepub fn emoji(self, emoji: impl Into<ReactionEmoji<'a>>) -> Self
pub fn emoji(self, emoji: impl Into<ReactionEmoji<'a>>) -> Self
Set emoji.
Sourcepub fn custom_id(self, id: impl Into<TitanString<'a>>) -> Self
pub fn custom_id(self, id: impl Into<TitanString<'a>>) -> Self
Set custom ID.
Sourcepub fn url(self, url: impl Into<TitanString<'a>>) -> Self
pub fn url(self, url: impl Into<TitanString<'a>>) -> Self
Set URL.
Trait Implementations§
Source§impl<'a> Clone for ButtonBuilder<'a>
impl<'a> Clone for ButtonBuilder<'a>
Source§fn clone(&self) -> ButtonBuilder<'a>
fn clone(&self) -> ButtonBuilder<'a>
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<'a> Debug for ButtonBuilder<'a>
impl<'a> Debug for ButtonBuilder<'a>
Source§impl<'a> Default for ButtonBuilder<'a>
impl<'a> Default for ButtonBuilder<'a>
Source§impl<'a> From<ButtonBuilder<'a>> for Component<'a>
impl<'a> From<ButtonBuilder<'a>> for Component<'a>
Source§fn from(builder: ButtonBuilder<'a>) -> Self
fn from(builder: ButtonBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ButtonBuilder<'a>
impl<'a> RefUnwindSafe for ButtonBuilder<'a>
impl<'a> Send for ButtonBuilder<'a>
impl<'a> Sync for ButtonBuilder<'a>
impl<'a> Unpin for ButtonBuilder<'a>
impl<'a> UnwindSafe for ButtonBuilder<'a>
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