pub enum MessageValidationErrorType {
    AttachmentFilename {
        filename: String,
    },
    ComponentCount {
        count: usize,
    },
    ComponentInvalid {
        idx: usize,
        kind: ComponentValidationErrorType,
    },
    ContentInvalid,
    EmbedInvalid {
        idx: usize,
        kind: EmbedValidationErrorType,
    },
    StickersInvalid {
        len: usize,
    },
    TooManyEmbeds,
    WebhookUsername,
}
Expand description

Type of MessageValidationError that occurred.

Variants

AttachmentFilename

Fields

filename: String

Invalid filename.

Attachment filename is not valid.

ComponentCount

Fields

count: usize

Number of components that were provided.

Too many message components were provided.

ComponentInvalid

Fields

idx: usize

Index of the component.

kind: ComponentValidationErrorType

Additional details about the validation failure type.

An invalid message component was provided.

ContentInvalid

Returned when the content is over 2000 UTF-16 characters.

EmbedInvalid

Fields

idx: usize

Index of the embed.

kind: EmbedValidationErrorType

Additional details about the validation failure type.

Returned when the embed is invalid.

StickersInvalid

Fields

len: usize

Invalid length.

Amount of stickers provided is invalid.

TooManyEmbeds

Too many embeds were provided.

A followup message can have up to 10 embeds.

WebhookUsername

Provided webhook username was invalid.

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