#[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
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.
TextInput::max_length
is invalid.
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
Auto Trait Implementations
impl RefUnwindSafe for ComponentValidationErrorType
impl Send for ComponentValidationErrorType
impl Sync for ComponentValidationErrorType
impl Unpin for ComponentValidationErrorType
impl UnwindSafe for ComponentValidationErrorType
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