pub struct EmbedBuilder<'a> { /* private fields */ }Expand description
Builder for creating an Embed.
Implementations§
Source§impl<'a> EmbedBuilder<'a>
impl<'a> EmbedBuilder<'a>
Sourcepub fn title(self, title: impl Into<TitanString<'a>>) -> Self
pub fn title(self, title: impl Into<TitanString<'a>>) -> Self
Set the title of the embed.
Sourcepub fn description(self, description: impl Into<TitanString<'a>>) -> Self
pub fn description(self, description: impl Into<TitanString<'a>>) -> Self
Set the description of the embed.
Sourcepub fn url(self, url: impl Into<TitanString<'a>>) -> Self
pub fn url(self, url: impl Into<TitanString<'a>>) -> Self
Set the URL of the embed.
Sourcepub fn timestamp(self, timestamp: impl Into<TitanString<'a>>) -> Self
pub fn timestamp(self, timestamp: impl Into<TitanString<'a>>) -> Self
Set the timestamp of the embed.
Sourcepub fn color_rgb(self, r: u8, g: u8, b: u8) -> Self
pub fn color_rgb(self, r: u8, g: u8, b: u8) -> Self
Set the color of the embed from RGB values.
Set the footer of the embed.
Sourcepub fn image(self, url: impl Into<TitanString<'a>>) -> Self
pub fn image(self, url: impl Into<TitanString<'a>>) -> Self
Set the image of the embed.
Sourcepub fn thumbnail(self, url: impl Into<TitanString<'a>>) -> Self
pub fn thumbnail(self, url: impl Into<TitanString<'a>>) -> Self
Set the thumbnail of the embed.
Set the author of the embed.
Sourcepub fn field(
self,
name: impl Into<TitanString<'a>>,
value: impl Into<TitanString<'a>>,
inline: bool,
) -> Self
pub fn field( self, name: impl Into<TitanString<'a>>, value: impl Into<TitanString<'a>>, inline: bool, ) -> Self
Add a field to the embed.
Sourcepub fn field_inline(
self,
name: impl Into<TitanString<'a>>,
value: impl Into<TitanString<'a>>,
) -> Self
pub fn field_inline( self, name: impl Into<TitanString<'a>>, value: impl Into<TitanString<'a>>, ) -> Self
Add an inline field.
Sourcepub fn field_block(
self,
name: impl Into<TitanString<'a>>,
value: impl Into<TitanString<'a>>,
) -> Self
pub fn field_block( self, name: impl Into<TitanString<'a>>, value: impl Into<TitanString<'a>>, ) -> Self
Add a block field (not inline).
Trait Implementations§
Source§impl<'a> Clone for EmbedBuilder<'a>
impl<'a> Clone for EmbedBuilder<'a>
Source§fn clone(&self) -> EmbedBuilder<'a>
fn clone(&self) -> EmbedBuilder<'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 EmbedBuilder<'a>
impl<'a> Debug for EmbedBuilder<'a>
Source§impl<'a> Default for EmbedBuilder<'a>
impl<'a> Default for EmbedBuilder<'a>
Source§fn default() -> EmbedBuilder<'a>
fn default() -> EmbedBuilder<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<EmbedBuilder<'a>> for Embed<'a>
impl<'a> From<EmbedBuilder<'a>> for Embed<'a>
Source§fn from(builder: EmbedBuilder<'a>) -> Self
fn from(builder: EmbedBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for EmbedBuilder<'a>
impl<'a> RefUnwindSafe for EmbedBuilder<'a>
impl<'a> Send for EmbedBuilder<'a>
impl<'a> Sync for EmbedBuilder<'a>
impl<'a> Unpin for EmbedBuilder<'a>
impl<'a> UnwindSafe for EmbedBuilder<'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