#[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>,
},
}
use twilight_util::builder::embed
Expand description
Type of EmbedError
that occurred.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AuthorNameEmpty
Fields
name: String
use twilight_util::builder::embed
Provided name. Although empty, the same owned allocation is included.
use twilight_util::builder::embed
Name is empty.
AuthorNameTooLong
Fields
use twilight_util::builder::embed
Name is longer than 256 UTF-16 code points.
ColorNotRgb
Fields
use twilight_util::builder::embed
Color was larger than a valid RGB hexadecimal value.
ColorZero
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
use twilight_util::builder::embed
Provided description. Although empty, the same owned allocation is included.
use twilight_util::builder::embed
Description is empty.
DescriptionTooLong
Fields
description: String
use twilight_util::builder::embed
Provided description.
use twilight_util::builder::embed
Description is longer than 4096 UTF-16 code points.
FieldNameEmpty
Fields
name: String
use twilight_util::builder::embed
Provided name. Although empty, the same owned allocation is included.
use twilight_util::builder::embed
Name is empty.
FieldNameTooLong
Fields
use twilight_util::builder::embed
Name is longer than 256 UTF-16 code points.
FieldValueEmpty
Fields
value: String
use twilight_util::builder::embed
Provided value. Although empty, the same owned allocation is included.
use twilight_util::builder::embed
Value is empty.
FieldValueTooLong
Fields
use twilight_util::builder::embed
Value is longer than 1024 UTF-16 code points.
FooterTextEmpty
use twilight_util::builder::embed
Footer text is empty.
FooterTextTooLong
use twilight_util::builder::embed
Footer text is longer than 2048 UTF-16 code points.
TitleEmpty
Fields
title: String
use twilight_util::builder::embed
Provided title. Although empty, the same owned allocation is included.
use twilight_util::builder::embed
Title is empty.
TitleTooLong
Fields
use twilight_util::builder::embed
Title is longer than 256 UTF-16 code points.
TotalContentTooLarge
Fields
length: usize
use twilight_util::builder::embed
The total length of the embed.
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>
use twilight_util::builder::embed
The provided fields.
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
Auto Trait Implementations
impl RefUnwindSafe for EmbedErrorType
impl Send for EmbedErrorType
impl Sync for EmbedErrorType
impl Unpin for EmbedErrorType
impl UnwindSafe for EmbedErrorType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more