#[non_exhaustive]
pub enum EmbedErrorType {
Show 16 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>, },
}
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Name is empty.

AuthorNameTooLong

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided name.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Name is longer than 256 UTF-16 code points.

ColorNotRgb

Fields

color: u32
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided color hex value.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Color was larger than a valid RGB hexadecimal value.

ColorZero

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

DescriptionEmpty

Fields

description: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Description is empty.

DescriptionTooLong

Fields

description: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided description.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Description is longer than 4096 UTF-16 code points.

FieldNameEmpty

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

value: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided value.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Name is empty.

FieldNameTooLong

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided name.

value: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided value.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Name is longer than 256 UTF-16 code points.

FieldValueEmpty

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided name.

value: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Value is empty.

FieldValueTooLong

Fields

name: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided name.

value: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided value.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Value is longer than 1024 UTF-16 code points.

FooterTextEmpty

Fields

text: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Footer text is empty.

FooterTextTooLong

Fields

text: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided text.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

TitleEmpty

Fields

title: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

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

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Title is empty.

TitleTooLong

Fields

title: String
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Provided title.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Title is longer than 256 UTF-16 code points.

TotalContentTooLarge

Fields

length: usize
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

The total length of the embed.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

The total content of the embed is too large.

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

TooManyFields

Fields

fields: Vec<EmbedField>
👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

The provided fields.

👎 Deprecated since 0.10.1:

use twilight_util::builder::embed

Too many fields were provided.

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

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

Returns the argument unchanged.

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

Calls U::from(self).

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more