pub enum SerenityMessageConvertError {
TooLongContent,
EmbedConvertError(SerenityEmbedConvertError),
}Expand description
Errors that can occur when converting a custom message struct to a serenity::all::CreateMessage.
Variants§
TooLongContent
This occurs when the message content exceeds 2000 characters, which is a limitation imposed by the Discord API.
Serenity-builder will report an error during conversion. Serenity does not return an error and leaves the response entirely up to the Discord API.
EmbedConvertError(SerenityEmbedConvertError)
This occurs when there is an error converting an embedded structure. The specific error details are encapsulated in the crate::embed::SerenityEmbedConvertError.
Trait Implementations§
Source§impl Debug for SerenityMessageConvertError
impl Debug for SerenityMessageConvertError
Source§impl Error for SerenityMessageConvertError
impl Error for SerenityMessageConvertError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<SerenityEmbedConvertError> for SerenityMessageConvertError
impl From<SerenityEmbedConvertError> for SerenityMessageConvertError
Source§fn from(source: SerenityEmbedConvertError) -> Self
fn from(source: SerenityEmbedConvertError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SerenityMessageConvertError
impl RefUnwindSafe for SerenityMessageConvertError
impl Send for SerenityMessageConvertError
impl Sync for SerenityMessageConvertError
impl Unpin for SerenityMessageConvertError
impl UnwindSafe for SerenityMessageConvertError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more