pub enum ModalInteractionComponent {
Show 13 variants
ActionRow(ModalInteractionActionRow),
ChannelSelect(ModalInteractionChannelSelect),
Checkbox(ModalInteractionCheckbox),
CheckboxGroup(ModalInteractionCheckboxGroup),
FileUpload(ModalInteractionFileUpload),
Label(ModalInteractionLabel),
MentionableSelect(ModalInteractionMentionableSelect),
RoleSelect(ModalInteractionRoleSelect),
StringSelect(ModalInteractionStringSelect),
TextDisplay(ModalInteractionTextDisplay),
TextInput(ModalInteractionTextInput),
Unknown(u8),
UserSelect(ModalInteractionUserSelect),
}Expand description
User filled in modal component.
Variants§
ActionRow(ModalInteractionActionRow)
Top-level layout component. In modals, layout components are preferred over action rows.
ChannelSelect(ModalInteractionChannelSelect)
Dropdown selection component for channels.
Checkbox(ModalInteractionCheckbox)
Checkbox Component
CheckboxGroup(ModalInteractionCheckboxGroup)
Checkbox Group Component.
FileUpload(ModalInteractionFileUpload)
File upload component.
Label(ModalInteractionLabel)
Top-level layout component including a string label and optional description.
MentionableSelect(ModalInteractionMentionableSelect)
Dropdown selection component for mentionables.
RoleSelect(ModalInteractionRoleSelect)
Dropdown selection component for roles.
StringSelect(ModalInteractionStringSelect)
Dropdown selection component for text.
TextDisplay(ModalInteractionTextDisplay)
Markdown text.
TextInput(ModalInteractionTextInput)
Text input component.
Unknown(u8)
Variant value is unknown to the library in the context of modals.
UserSelect(ModalInteractionUserSelect)
Dropdown selection component for users.
Implementations§
Source§impl ModalInteractionComponent
impl ModalInteractionComponent
Sourcepub fn kind(&self) -> ComponentType
pub fn kind(&self) -> ComponentType
Type of component that this is.
Trait Implementations§
Source§impl Clone for ModalInteractionComponent
impl Clone for ModalInteractionComponent
Source§fn clone(&self) -> ModalInteractionComponent
fn clone(&self) -> ModalInteractionComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModalInteractionComponent
impl Debug for ModalInteractionComponent
Source§impl<'de> Deserialize<'de> for ModalInteractionComponent
impl<'de> Deserialize<'de> for ModalInteractionComponent
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ModalInteractionActionRow> for ModalInteractionComponent
impl From<ModalInteractionActionRow> for ModalInteractionComponent
Source§fn from(action_row: ModalInteractionActionRow) -> Self
fn from(action_row: ModalInteractionActionRow) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionCheckbox> for ModalInteractionComponent
impl From<ModalInteractionCheckbox> for ModalInteractionComponent
Source§fn from(checkbox: ModalInteractionCheckbox) -> Self
fn from(checkbox: ModalInteractionCheckbox) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionCheckboxGroup> for ModalInteractionComponent
impl From<ModalInteractionCheckboxGroup> for ModalInteractionComponent
Source§fn from(checkbox_group: ModalInteractionCheckboxGroup) -> Self
fn from(checkbox_group: ModalInteractionCheckboxGroup) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionFileUpload> for ModalInteractionComponent
impl From<ModalInteractionFileUpload> for ModalInteractionComponent
Source§fn from(file_upload: ModalInteractionFileUpload) -> Self
fn from(file_upload: ModalInteractionFileUpload) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionLabel> for ModalInteractionComponent
impl From<ModalInteractionLabel> for ModalInteractionComponent
Source§fn from(label: ModalInteractionLabel) -> Self
fn from(label: ModalInteractionLabel) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionTextDisplay> for ModalInteractionComponent
impl From<ModalInteractionTextDisplay> for ModalInteractionComponent
Source§fn from(text_display: ModalInteractionTextDisplay) -> Self
fn from(text_display: ModalInteractionTextDisplay) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionTextInput> for ModalInteractionComponent
impl From<ModalInteractionTextInput> for ModalInteractionComponent
Source§fn from(text_input: ModalInteractionTextInput) -> Self
fn from(text_input: ModalInteractionTextInput) -> Self
Converts to this type from the input type.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionActionRow
impl TryFrom<ModalInteractionComponent> for ModalInteractionActionRow
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionCheckbox
impl TryFrom<ModalInteractionComponent> for ModalInteractionCheckbox
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionCheckboxGroup
impl TryFrom<ModalInteractionComponent> for ModalInteractionCheckboxGroup
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionFileUpload
impl TryFrom<ModalInteractionComponent> for ModalInteractionFileUpload
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionLabel
impl TryFrom<ModalInteractionComponent> for ModalInteractionLabel
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionChannelSelect
impl TryFrom<ModalInteractionComponent> for ModalInteractionChannelSelect
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionMentionableSelect
impl TryFrom<ModalInteractionComponent> for ModalInteractionMentionableSelect
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionRoleSelect
impl TryFrom<ModalInteractionComponent> for ModalInteractionRoleSelect
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionUserSelect
impl TryFrom<ModalInteractionComponent> for ModalInteractionUserSelect
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionStringSelect
impl TryFrom<ModalInteractionComponent> for ModalInteractionStringSelect
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionTextDisplay
impl TryFrom<ModalInteractionComponent> for ModalInteractionTextDisplay
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
Source§impl TryFrom<ModalInteractionComponent> for ModalInteractionTextInput
impl TryFrom<ModalInteractionComponent> for ModalInteractionTextInput
Source§type Error = ModalInteractionComponent
type Error = ModalInteractionComponent
The type returned in the event of a conversion error.
impl Eq for ModalInteractionComponent
impl StructuralPartialEq for ModalInteractionComponent
Auto Trait Implementations§
impl Freeze for ModalInteractionComponent
impl RefUnwindSafe for ModalInteractionComponent
impl Send for ModalInteractionComponent
impl Sync for ModalInteractionComponent
impl Unpin for ModalInteractionComponent
impl UnsafeUnpin for ModalInteractionComponent
impl UnwindSafe for ModalInteractionComponent
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