twilight_validate::request

Enum ValidationErrorType

Source
pub enum ValidationErrorType {
Show 37 variants AuditReason { len: usize, }, AutoModerationBlockActionCustomMessageLimit { len: usize, }, AutoModerationMetadataMentionTotalLimit { limit: u8, }, AutoModerationMetadataKeywordFilter { len: usize, }, AutoModerationMetadataKeywordFilterItem { len: usize, substring: String, }, AutoModerationMetadataAllowList { len: usize, }, AutoModerationMetadataAllowListItem { len: usize, substring: String, }, AutoModerationMetadataPresetAllowList { len: usize, }, AutoModerationMetadataPresetAllowListItem { len: usize, substring: String, }, AutoModerationActionMetadataDurationSeconds { seconds: u32, }, AutoModerationMetadataRegexPatterns { len: usize, }, AutoModerationMetadataRegexPatternsItem { len: usize, substring: String, }, AutoModerationExemptRoles { len: usize, }, AutoModerationExemptChannels { len: usize, }, CreateGuildBanDeleteMessageSeconds { seconds: u32, }, CommunicationDisabledUntil { timestamp: Timestamp, }, GetChannelMessages { limit: u16, }, GetCurrentUserGuilds { limit: u16, }, GetEntitlements { limit: u8, }, GetGuildAuditLog { limit: u16, }, GetGuildBans { limit: u16, }, GetGuildMembers { limit: u16, }, GetReactions { limit: u16, }, GuildName { len: usize, }, GuildPruneDays { days: u16, }, InviteMaxAge { max_age: u32, }, InviteMaxUses { max_uses: u16, }, Nickname { len: usize, }, ScheduledEventDescription { len: usize, }, ScheduledEventGetUsers { limit: u16, }, ScheduledEventName { len: usize, }, SearchGuildMembers { limit: u16, }, StageTopic { len: usize, }, TemplateDescription { len: usize, }, TemplateName { len: usize, }, Username { len: Option<usize>, substring: Option<&'static str>, }, WebhookUsername { len: Option<usize>, substring: Option<&'static str>, },
}
Expand description

Type of ValidationError that occurred.

Variants§

§

AuditReason

Provided audit reason was too large.

Fields

§len: usize

Invalid length.

§

AutoModerationBlockActionCustomMessageLimit

Provided block action custom message was too long.

Fields

§len: usize

Invalid limit.

§

AutoModerationMetadataMentionTotalLimit

Provided limit was too large.

Fields

§limit: u8

Invalid limit.

§

AutoModerationMetadataKeywordFilter

Provided keyword filter was invalid.

Fields

§len: usize

Invalid length.

§

AutoModerationMetadataKeywordFilterItem

Provided keyword was invalid.

Fields

§len: usize

Invalid length.

§substring: String

Invalid substring.

§

AutoModerationMetadataAllowList

Provided keyword allow list was invalid.

Fields

§len: usize

Invalid length.

§

AutoModerationMetadataAllowListItem

Provided allow list item was invalid.

Fields

§len: usize

Invalid length.

§substring: String

Invalid substring.

§

AutoModerationMetadataPresetAllowList

Provided keyword preset allow list was invalid.

Fields

§len: usize

Invalid length.

§

AutoModerationMetadataPresetAllowListItem

Provided keyword preset allow list item was invalid.

Fields

§len: usize

Invalid length.

§substring: String

Invalid substring.

§

AutoModerationActionMetadataDurationSeconds

Provided seconds to disable communication was invalid.

Fields

§seconds: u32

Invalid seconds.

§

AutoModerationMetadataRegexPatterns

Provided regex patterns was invalid.

Fields

§len: usize

Invalid length.

§

AutoModerationMetadataRegexPatternsItem

Provided regex patterns item was invalid.

Fields

§len: usize

Invalid length.

§substring: String

Invalid substring.

§

AutoModerationExemptRoles

Provided exempt roles was invalid.

Fields

§len: usize

Invalid length.

§

AutoModerationExemptChannels

Provided exempt channels was invalid.

Fields

§len: usize

Invalid length.

§

CreateGuildBanDeleteMessageSeconds

Provided create guild ban delete message seconds was invalid.

Fields

§seconds: u32

Invalid seconds.

§

CommunicationDisabledUntil

Provided timestamp is too far in the future.

Fields

§timestamp: Timestamp

Invalid timestamp.

§

GetChannelMessages

Provided get channel messages limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GetCurrentUserGuilds

Provided get current user guilds limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GetEntitlements

Provided get entitlements limit was invalid.

Fields

§limit: u8

Invalid limit.

§

GetGuildAuditLog

Provided get guild audit log limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GetGuildBans

Provided get guild bans limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GetGuildMembers

Provided get guild members limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GetReactions

Provided get reactions limit was invalid.

Fields

§limit: u16

Invalid limit.

§

GuildName

Provided guild name was invalid.

Fields

§len: usize

Invalid length.

§

GuildPruneDays

Provided guild prune days was invalid.

Fields

§days: u16

Invalid days.

§

InviteMaxAge

Provided invite max age was invalid.

Fields

§max_age: u32

Invalid age.

§

InviteMaxUses

Provided invite max uses was invalid.

Fields

§max_uses: u16

Invalid age.

§

Nickname

Provided nickname length was invalid.

Fields

§len: usize

Invalid length.

§

ScheduledEventDescription

Scheduled event description is invalid.

Fields

§len: usize

Invalid length.

§

ScheduledEventGetUsers

Scheduled event get users limit is invalid.

Fields

§limit: u16

Invalid limit.

§

ScheduledEventName

Scheduled event name is invalid.

Fields

§len: usize

Invalid length.

§

SearchGuildMembers

Provided search guild members limit was invalid.

Fields

§limit: u16

Invalid limit.

§

StageTopic

Provided stage instance topic was invalid.

Fields

§len: usize

Invalid length.

§

TemplateDescription

Provided guild template description was invalid.

Fields

§len: usize

Invalid length.

§

TemplateName

Provided guild template name was invalid.

Fields

§len: usize

Invalid length.

§

Username

Provided username was invalid.

Fields

§len: Option<usize>

Invalid length.

§substring: Option<&'static str>

Invalid substring.

§

WebhookUsername

Provided webhook username was invalid.

Fields

§len: Option<usize>

Invalid length.

§substring: Option<&'static str>

Invalid substring.

Trait Implementations§

Source§

impl Debug for ValidationErrorType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.