Struct EmbedBuilder

Source
pub struct EmbedBuilder<'a> { /* private fields */ }
Expand description

Builder for a message embed

Implementations§

Source§

impl<'a> EmbedBuilder<'a>

Source

pub fn new() -> Self

Source

pub fn set_title(&mut self, title: &'a str)

Source

pub fn with_title(self, title: &'a str) -> Self

Source

pub fn set_author(&mut self, author: &'a EmbedAuthor<'a>)

Source

pub fn with_author(self, author: &'a EmbedAuthor<'a>) -> Self

Source

pub fn set_color(&mut self, color: u32)

Source

pub fn with_color(self, color: u32) -> Self

Source

pub fn add_field(&mut self, field: &'a EmbedField<'a>)

Source

pub fn with_field(self, field: &'a EmbedField<'a>) -> Self

Source

pub fn set_description(&mut self, description: &'a str)

Source

pub fn with_description(self, description: &'a str) -> Self

Source

pub fn set_timestamp(&mut self, timestamp: &'a str)

Source

pub fn with_timestamp(self, timestamp: &'a str) -> Self

Trait Implementations§

Source§

impl<'a> Debug for EmbedBuilder<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for EmbedBuilder<'a>

Source§

fn default() -> EmbedBuilder<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Serialize for EmbedBuilder<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.