#[non_exhaustive]
pub enum ComponentValidationErrorType {
Show 20 variants ActionRowComponentCount { count: usize, }, ButtonConflict, ButtonStyle { style: ButtonStyle, }, ComponentCount { count: usize, }, ComponentCustomIdLength { chars: usize, }, ComponentLabelLength { chars: usize, }, InvalidChildComponent { kind: ComponentType, }, InvalidRootComponent { kind: ComponentType, }, SelectMaximumValuesCount { count: usize, }, SelectMinimumValuesCount { count: usize, }, SelectOptionCount { count: usize, }, SelectOptionDescriptionLength { chars: usize, }, SelectOptionLabelLength { chars: usize, }, SelectOptionValueLength { chars: usize, }, SelectPlaceholderLength { chars: usize, }, TextInputLabelLength { len: usize, }, TextInputMaxLength { len: usize, }, TextInputMinLength { len: usize, }, TextInputPlaceholderLength { chars: usize, }, TextInputValueLength { chars: usize, },
}
Expand description

Type of ComponentValidationError 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.
§

ActionRowComponentCount

Fields

§count: usize

Number of components within the action row.

Number of components a provided ActionRow is larger than the maximum.

§

ButtonConflict

Button has both a custom ID and URL set.

§

ButtonStyle

Fields

§style: ButtonStyle

Style of the button.

Button does not have the required field based on its style.

A button with a style of ButtonStyle::Link must have a URL set, while buttons of other styles must have a custom ID set.

§

ComponentCount

Fields

§count: usize

Number of components that were provided.

Number of components provided is larger than the maximum.

§

ComponentCustomIdLength

Fields

§chars: usize

Number of codepoints that were provided.

Component custom ID is larger than the the maximum.

§

ComponentLabelLength

Fields

§chars: usize

Number of codepoints that were provided.

Component label is larger than the maximum.

§

InvalidChildComponent

Fields

§kind: ComponentType

Type of provided component.

Provided component cannot be a child component.

§

InvalidRootComponent

Fields

§kind: ComponentType

Type of provided component.

Provided component cannot be a root component.

§

SelectMaximumValuesCount

Fields

§count: usize

Number of options that were provided.

Maximum number of items that can be chosen is smaller than the minimum or larger than the maximum.

§

SelectMinimumValuesCount

Fields

§count: usize

Number of options that were provided.

Minimum number of items that must be chosen is larger than the maximum.

§

SelectOptionCount

Fields

§count: usize

Number of options that were provided.

Number of select menu options provided is larger than the maximum.

§

SelectOptionDescriptionLength

Fields

§chars: usize

Number of codepoints that were provided.

Description of a select menu option is larger than the maximum.

§

SelectOptionLabelLength

Fields

§chars: usize

Number of codepoints that were provided.

Label of a select menu option is larger than the maximum.

§

SelectOptionValueLength

Fields

§chars: usize

Number of codepoints that were provided.

Value of a select menu option is larger than the maximum.

§

SelectPlaceholderLength

Fields

§chars: usize

Number of codepoints that were provided.

Placeholder of a component is larger than the maximum.

§

TextInputLabelLength

Fields

§len: usize

Provided length.

TextInput::label is invalid.

§

TextInputMaxLength

Fields

§len: usize

Provided length.

§

TextInputMinLength

Fields

§len: usize

Provided length.

TextInput::min_length is too long.

§

TextInputPlaceholderLength

Fields

§chars: usize

Provided number of codepoints.

Placeholder of a TextInput component is larger than TEXT_INPUT_PLACEHOLDER_MAX.

§

TextInputValueLength

Fields

§chars: usize

Provided number of codepoints.

Value of a TextInput component is larger than TEXT_INPUT_LENGTH_MAX.

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