[][src]Enum twilight_http::request::channel::message::EmbedValidationError

#[non_exhaustive]pub enum EmbedValidationError {
    AuthorNameTooLarge {
        chars: usize,
    },
    DescriptionTooLarge {
        chars: usize,
    },
    EmbedTooLarge {
        chars: usize,
    },
    FieldNameTooLarge {
        chars: usize,
    },
    FieldValueTooLarge {
        chars: usize,
    },
    FooterTextTooLarge {
        chars: usize,
    },
    TitleTooLarge {
        chars: usize,
    },
    TooManyFields {
        amount: usize,
    },
}

An embed is not valid.

Referenced values are used from the Discord docs.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AuthorNameTooLarge

The embed author's name is larger than the maximum.

Fields of AuthorNameTooLarge

chars: usize

The number of codepoints that were provided.

DescriptionTooLarge

The embed description is larger than the maximum.

Fields of DescriptionTooLarge

chars: usize

The number of codepoints that were provided.

EmbedTooLarge

The combined content of all embed fields - author name, description, footer, field names and values, and title - is larger than the maximum.

Fields of EmbedTooLarge

chars: usize

The number of codepoints that were provided.

FieldNameTooLarge

A field's name is larger than the maximum.

Fields of FieldNameTooLarge

chars: usize

The number of codepoints that were provided.

FieldValueTooLarge

A field's value is larger than the maximum.

Fields of FieldValueTooLarge

chars: usize

The number of codepoints that were provided.

FooterTextTooLarge

The footer text is larger than the maximum.

Fields of FooterTextTooLarge

chars: usize

The number of codepoints that were provided.

TitleTooLarge

The title is larger than the maximum.

Fields of TitleTooLarge

chars: usize

The number of codepoints that were provided.

TooManyFields

There are more than the maximum number of fields in the embed.

Fields of TooManyFields

amount: usize

The number of fields that were provided.

Implementations

impl EmbedValidationError[src]

pub const AUTHOR_NAME_LENGTH: usize[src]

The maximum embed author name length in codepoints.

pub const DESCRIPTION_LENGTH: usize[src]

The maximum embed description length in codepoints.

pub const EMBED_TOTAL_LENGTH: usize[src]

The maximum combined embed length in codepoints.

pub const FIELD_COUNT: usize[src]

The maximum number of fields in an embed.

pub const FIELD_NAME_LENGTH: usize[src]

The maximum length of an embed field name in codepoints.

pub const FIELD_VALUE_LENGTH: usize[src]

The maximum length of an embed field value in codepoints.

pub const FOOTER_TEXT_LENGTH: usize[src]

The maximum embed footer length in codepoints.

pub const TITLE_LENGTH: usize[src]

The maximum embed title length in codepoints.

Trait Implementations

impl Clone for EmbedValidationError[src]

impl Debug for EmbedValidationError[src]

impl Display for EmbedValidationError[src]

impl Error for EmbedValidationError[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> ToString for T where
    T: Display + ?Sized
[src]

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.