Enum twilight_embed_builder::EmbedErrorType[][src]

#[non_exhaustive]
pub enum EmbedErrorType {
Show variants AuthorNameEmpty { name: String, }, AuthorNameTooLong { name: String, }, ColorNotRgb { color: u32, }, ColorZero, DescriptionEmpty { description: String, }, DescriptionTooLong { description: String, }, FieldNameEmpty { name: String, value: String, }, FieldNameTooLong { name: String, value: String, }, FieldValueEmpty { name: String, value: String, }, FieldValueTooLong { name: String, value: String, }, FooterTextEmpty { text: String, }, FooterTextTooLong { text: String, }, TitleEmpty { title: String, }, TitleTooLong { title: String, }, TotalContentTooLarge { length: usize, }, TooManyFields { fields: Vec<EmbedField>, },
}
Expand description

Type of EmbedError that occurred.

Variants (Non-exhaustive)

This enum is marked as 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.
AuthorNameEmpty

Name is empty.

Show fields

Fields of AuthorNameEmpty

name: String

Provided name. Although empty, the same owned allocation is included.

AuthorNameTooLong

Name is longer than 256 UTF-16 code points.

Show fields

Fields of AuthorNameTooLong

name: String

Provided name.

ColorNotRgb

Color was larger than a valid RGB hexadecimal value.

Show fields

Fields of ColorNotRgb

color: u32

Provided color hex value.

ColorZero

Color was 0. The value would be thrown out by Discord and is equivalent to null.

DescriptionEmpty

Description is empty.

Show fields

Fields of DescriptionEmpty

description: String

Provided description. Although empty, the same owned allocation is included.

DescriptionTooLong

Description is longer than 4096 UTF-16 code points.

Show fields

Fields of DescriptionTooLong

description: String

Provided description.

FieldNameEmpty

Name is empty.

Show fields

Fields of FieldNameEmpty

name: String

Provided name. Although empty, the same owned allocation is included.

value: String

Provided value.

FieldNameTooLong

Name is longer than 256 UTF-16 code points.

Show fields

Fields of FieldNameTooLong

name: String

Provided name.

value: String

Provided value.

FieldValueEmpty

Value is empty.

Show fields

Fields of FieldValueEmpty

name: String

Provided name.

value: String

Provided value. Although empty, the same owned allocation is included.

FieldValueTooLong

Value is longer than 1024 UTF-16 code points.

Show fields

Fields of FieldValueTooLong

name: String

Provided name.

value: String

Provided value.

FooterTextEmpty

Footer text is empty.

Show fields

Fields of FooterTextEmpty

text: String

Provided text. Although empty, the same owned allocation is included.

FooterTextTooLong

Footer text is longer than 2048 UTF-16 code points.

Show fields

Fields of FooterTextTooLong

text: String

Provided text.

TitleEmpty

Title is empty.

Show fields

Fields of TitleEmpty

title: String

Provided title. Although empty, the same owned allocation is included.

TitleTooLong

Title is longer than 256 UTF-16 code points.

Show fields

Fields of TitleTooLong

title: String

Provided title.

TotalContentTooLarge

The total content of the embed is too large.

Refer to EmbedBuilder::EMBED_LENGTH_LIMIT for more information about what goes into this limit.

Show fields

Fields of TotalContentTooLarge

length: usize

The total length of the embed.

TooManyFields

Too many fields were provided.

Refer to EmbedBuilder::EMBED_FIELD_LIMIT for more information about what the limit is.

Show fields

Fields of TooManyFields

fields: Vec<EmbedField>

The provided fields.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.