[][src]Struct twilight_embed_builder::author::EmbedAuthorBuilder

#[must_use = "must be built into an embed author"]pub struct EmbedAuthorBuilder(_);

Create an embed author with a builder.

This can be passed into EmbedBuilder::author.

Implementations

impl EmbedAuthorBuilder[src]

pub const NAME_LENGTH_LIMIT: usize[src]

The maximum number of UTF-16 code points that can be in an author name.

This is used by name.

pub fn new() -> Self[src]

Create a new default embed author builder.

#[must_use = "should be used as part of an embed builder"]pub fn build(self) -> EmbedAuthor[src]

Build into an embed author.

pub fn icon_url(self, image_source: ImageSource) -> Self[src]

Add an author icon.

pub fn name(self, name: impl Into<String>) -> Result<Self, EmbedAuthorNameError>[src]

The author's name.

Refer to NAME_LENGTH_LIMIT for the maximum number of UTF-16 code points that can be in a description.

Errors

Returns EmbedAuthorNameError::Empty if the provided name is empty.

Returns EmbedAuthorNameError::TooLong if the provided name is longer than the maximum number of code points.

pub fn url(self, url: impl Into<String>) -> Self[src]

The author's url.

Trait Implementations

impl Clone for EmbedAuthorBuilder[src]

impl Debug for EmbedAuthorBuilder[src]

impl Default for EmbedAuthorBuilder[src]

impl Eq for EmbedAuthorBuilder[src]

impl From<EmbedAuthorBuilder> for EmbedAuthor[src]

fn from(builder: EmbedAuthorBuilder) -> Self[src]

Convert an embed author builder into an embed author.

This is equivalent to calling EmbedAuthorBuilder::build.

impl PartialEq<EmbedAuthorBuilder> for EmbedAuthorBuilder[src]

impl StructuralEq for EmbedAuthorBuilder[src]

impl StructuralPartialEq for EmbedAuthorBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.